Hi Ilia,

You may want to have a try of the showtext package
(https://github.com/yixuan/showtext). Below is a quick example:

library(showtext)
showtext.auto()

pdf("test.pdf")
## Use the "sans" font family provided by the showtext package
## font == 3 means italic font face
plot(1, xlab = "Unicode characters: \u00C0 \u00C6 \u00D8",
    family = "sans", font.lab = 3)
dev.off()

## Same for SVG
svg("test.svg")
plot(1, xlab = "Unicode characters: \u00C0 \u00C6 \u00D8",
    family = "sans", font.lab = 3)
dev.off()


Best,
Yixuan


2017-07-07 13:08 GMT-04:00 Ilia Kats <ilia-k...@gmx.net>:
> Interesting. I did not have the package installed, but I did at some point
> extract Helvetica from some MacOSX font files and R was using that just fine
> until 3.3. This is how the plot looks in 3.4 (still using Helvetica):
> https://ptpb.pw/HikX.pdf . After removing Helvetica, installing the
> ttf-mscorefonts-installer package, and running fc-cache --force  the plot
> looks like this: https://ptpb.pw/CM8A.pdf
>
> Also note that the standard pdf device works fine: https://ptpb.pw/3Ml1.pdf
> , it's just the cairo devices (both pdf and svg) that have the issue.
> Unfortunately I need to use cairo_pdf due to unicode characters in axis
> labels.
>
> Cheers, Ilia
>




-- 
Yixuan Qiu <yixuan....@cos.name>
Department of Statistics,
Purdue University

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to