开发者

R and unicode PDF fonts on linux - letters got stuck together

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:

R and unicode PDF fonts on linux - letters got stuck together

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 开发者_如何学CPDF device.


Ah, it was easy.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜