Skip to content

Italics in svg output display as bold (PR#13463)

3 messages · Brian Ripley, Yan Wong

#
Full_Name: Yan Wong
Version: 2.8.1
OS: Mac OS X 10.4
Submission from: (NULL) (78.149.167.246)


When printing a plot to and svg file, text intended to be in italics is rendered
in bold (svg file viewed using both Safari 3.2.1 and Firefox 2.0.0.9.

For example, 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()

Yan
#
It is a bug on your system: this is done by cairographics, and I 
suspect that the version you have is broken (or possibly your viewer).
I'll attach the version I get, which does display in italics on my 
system.

I used cairo-1.8.0-1.fc10.x86_64 (on Fedora 10).
On Wed, 21 Jan 2009, yan at pixie.org.uk wrote:

            
And how did you compile it?  This might be a bug in the cairographics 
or fontconfig library used for the CRAN binary build, if you used that 
(and report such issues to R-sig-mac -- see the posting guide).

  
    
#
On 22 Jan 2009, at 11:58, Brian D Ripley wrote:

            
Thanks for that. I do see italics in your file using my 2 viewers, so  
I guess that the problem is not my viewer.
Yes, apologies for not stating: this is the latest OS X binary build  
from CRAN. I'll report the issue to R-sig-mac as you advise.

Cheers

Yan