Open ellisp opened 10 years ago
I have a similar problem with Calibri and the postscript device.
The png device works fine. The postscript device either gives me irregularly spaced letters, or an error like the following:
Error in mtext(unit_text, at = par("usr")[1] - (par("usr")[2] - par("usr")[1])/30, : metric information not available for this device
I hope that there is a solution to this issue with certain devices and certain fonts not working...
sessionInfo()
R version 3.1.1 (2014-07-10) Platform: x86_64-w64-mingw32/x64 (64-bit)
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] Rttf2pt1_1.3.1 extrafont_0.16 RColorBrewer_1.0-5
loaded via a namespace (and not attached): [1] extrafontdb_1.0 tools_3.1.1
Edit - having looked more into this I find that in fact none of my pdfs correctly embed the fonts, it's just that in some cases a substitute font is used and in others pdf cannot find a font at all. So the issue is very likely something in my setup, and amounts to loadfonts() is not working for the pdf device. As this looks more like a straight "helpdesk" query I'm happy to have it dropped as an "issue" here.
I have successfully imported and loaded fonts and they all work fine in a Windows device or a png device, and some of them work in a pdf but not all do; either they return warnings and no text (Calibri) or cause an error and stop (eg Aharoni). The script at the bottom shows the problem is in about a third of my fonts.
The error message Aharoni gives when being used with a pdf is "Error in axis(side = side, at = at, labels = labels, ...) : invalid font type"
The warning message Calibri gives when being used with a pdf is multiple instances such as those below "27: In axis(side = side, at = at, labels = labels, ...) : font width unknown for character 0x30 28: In title(...) : font width unknown for character 0x41"
So, when I push something in Calibri to a pdf I get this:
Whereas if I do the same to a png I get this:
But the problem isn't that my pdf device is useless because some other fonts eg Georgia, Calisto MT, Castellar - just to pick at random - work fine.