From Xavier.Robin at unige.ch  Tue Feb 10 16:52:51 2009
From: Xavier.Robin at unige.ch (Xavier Robin)
Date: Tue, 10 Feb 2009 07:52:51 -0800 (PST)
Subject: [Rd] Italics in svg output display as bold (PR#13463)
In-Reply-To: <D8D645C3-B243-4D2F-877D-8C0F98ADB1D5@pixie.org.uk>
References: <20090121220013.97061282EFC2@mail.pubhealth.ku.dk>
	<alpine.LFD.2.00.0901221153020.20762@toucan.stats.ox.ac.uk>
	<D8D645C3-B243-4D2F-877D-8C0F98ADB1D5@pixie.org.uk>
Message-ID: <21936538.post@talk.nabble.com>



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:
<https://stat.ethz.ch/pipermail/r-sig-mac/2009-January/005816.html>
> cairographics cannot locate an italic version of the font

The following testcase tends to show the contrary:

library(Cairo)
Cairo("plot.png", width=7, height=7, units="cm", dpi=100)
plot.new()
par(family="Arial")
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")))
dev.off()

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: http://www.nabble.com/Italics-in-svg-output-display-as-bold-%28PR-13463%29-tp21602252p21936538.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] Italics in svg output display as bold (PR#13463)
Xavier Robin