Skip to content

Kerning issues with CairoPDF

2 messages · Karl Ove Hufthammer

#
Dear list members

I'm using CairoPDF to generate PDF (because of its font embedding and 
support for transparent colours). However, at least on my (Windows) 
system, the text it outputs seems to have completely wrong kerning. 
Here's an example:

CairoPDF("test.pdf")
  plot(rnorm(100),xlab="Ovreset")
dev.off()

The v is (slightly) too far away from the O, it's much too close to the 
r, partially overlapping it, and the e is too far away from the s.

Can anyone reproduce it? Any ideas what's causing it, if it's possible 
to fix it, or if just a bug in CairoPDF. I remember a kerning-related 
change in R 2.9.0. Could that be related?
R version 2.10.0 (2009-10-26) 
i386-pc-mingw32 

locale:
[1] LC_COLLATE=Norwegian-Nynorsk_Norway.1252 
[2] LC_CTYPE=Norwegian-Nynorsk_Norway.1252   
[3] LC_MONETARY=Norwegian-Nynorsk_Norway.1252
[4] LC_NUMERIC=C                             
[5] LC_TIME=Norwegian-Nynorsk_Norway.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] Cairo_1.4-5

loaded via a namespace (and not attached):
[1] tools_2.10.0
1 day later
#
Karl Ove Hufthammer wrote:

            
For the record, there are no problems with R 2.9.2 on my Mandriva Linux 2010 
system. But it?s a different font which gets embedded (Liberation Sans on 
Linux vs. Arial on Windows).