3

I have a little problem in Unicode PDF/postscript fonts in R on linux, using Czech UTF glyphs.

It's quite simple - I have something - for example, the word Měsíce - written on R plot, which is painted to PDF device, with the default font Helvetica.

The PDF is painted correctly, but if I open/print the file on Windows in Adobe Reader, it looks (and, sandly, prints) like this:

Mesice

Interesting thing is - if I open the same PDF in Mac OS X in Preview.app, the letters seem correct (I cannot test it on Linux PDF viewer right now). Also, if I create the file on Mac version of R, it looks good on all systems, too. However, I have to create the PDF file on the Linux machine, so I want to make it work.

Also, if I try to change the font in R by setting family="some other font", in most fonts the Czech glyphs are not even present at all. The only other font than Helvetica that has the Czech glyphs is Times, but it "mangles" the letters in simmilar way.

I use Debian 6.0.1 (squeeze), R version is 2.11.1, installed by apt-get. I use the default R PDF device.

Karel Bílek
  • 36,467
  • 31
  • 94
  • 149
  • Yes -- http://stackoverflow.com/questions/5886018/using-unicode-dingbat-like-glyphs-in-r-graphics-across-devices-platforms-es is relevant (although not identical) – Ben Bolker Jul 15 '11 at 16:01
  • Care to make the title a bit more informative to help search engines? – Roman Luštrik Jul 15 '11 at 16:09

1 Answers1

3

Ah, it was easy.

I had to use cairo_pdf() instead of the default PDF device. That did the trick.

Karel Bílek
  • 36,467
  • 31
  • 94
  • 149