library(extrafont)
setEPS()
postscript("demo.eps", width=3.3, height=3.3, onefile=FALSE, horizontal=FALSE, paper = "special", family = "Times New Roman")
plot(rnorm(100), main="Hey Some Data")
dev.off()
I have extrafont package installed and also imported fonts and loaded the fonts for postscript device. Everything was ok. But when postscript device was started with a specific font and the plot command was given it started throwing a list of error messages which basically says "font width unknown for character 0x53" etc. I embedded the font also in the graph with extrafont command embed_fonts(). It produced a plot, but no font changes were made. But when I used cairo_ps device, it worked perfectly fine. Why is it not working with postscript device? Any help?
extrafont::font_import()
) after which I have imported fonts to the pdf device (extrafont::loadfonts(device = "pdf")
). It could relate to an open issue with extrafont? github.com/wch/extrafont/issues/34 . Using cairopdf it also worked fine for me. – FM Kerckhofcairo_ps
instead ofpostscript
. – jarauh