[R-SIG-Mac] Possible mac-specific bug in svg (cairo) graphics

Simon Urbanek simon.urbanek at r-project.org
Tue Jan 27 17:16:06 CET 2009


I think you got the corresponding response to your post before -  
cairographics cannot locate an italic version of the font - switching  
to a font which has the desired traits will produce the desired  
output, e.g.:

svg("test.svg", width=4,4,8)
par(family="Arial")
plot.new()
text(0.5,0.5,labels=expression(italic("This should be in italics")))
dev.off()

Cheers,
S



On Jan 27, 2009, at 10:33 , Yan Wong wrote:

> Hi,
>
> Using the Mac OS X binary (R 2.8.1) from CRAN, generating SVG files  
> with italics produces bold text instead. I reported this to R-bugs,  
> and as it seems to be a Mac-specific problem, I was advised to  
> report it here.
>
> As a test case, try viewing the test.svg file generated by
>
> svg("test.svg", width=4,4,8)
> plot.new()
> text(0.5,0.5,labels=expression(italic("This should be in italics")))
> dev.off()
>
> On my system (OS X 10.4.11) viewing the SVG file either in Safari  
> 3.2.1 or Firefox 2.0.0.9 shows bold text.
>
> Cheers
>
> Yan
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
>



More information about the R-SIG-Mac mailing list