Re: [Rd] Italics in svg output display as bold (PR#13463)

From: Xavier Robin <>
Date: Tue, 10 Feb 2009 07:52:51 -0800 (PST)

Yan Wong-3 wrote:
> On 22 Jan 2009, at 11:58, Brian D Ripley wrote:

>> 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.

> Thanks for that. I do see italics in your file using my 2 viewers, so
> I guess that the problem is not my viewer.

At this point I should note that I can see this on Windows XP as well. Using R 2.8.1 (CRAN binary version) and version 1.4-4 of Cairo from CRAN (windows binary).

It doesn't seem specific to SVG, I can reproduce it with pdf or png as well.

On R-SIG-Mac, Simon Urbanek wrote:
> cairographics cannot locate an italic version of the font

The following testcase tends to show the contrary:

Cairo("plot.png", width=7, height=7, units="cm", dpi=100)
text(0.5,0.4,labels=expression(italic("This should be in italics"))) text(0.5,0.6,labels=expression(bold("This should be in bold")))

The text that should be in italics is in bold, and vice versa. This makes me think Cairo actually finds both italics and bold, but gets confused somewhere...

I tried replacing Arial by Times or Tahoma, or removing the call to par(), but italics and bold are always reversed (with the correct family used).

View this message in context:
Sent from the R devel mailing list archive at

______________________________________________ mailing list
Received on Tue 10 Feb 2009 - 14:57:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 10 Feb 2009 - 16:30:21 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive