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?
Use "ArialMT" instead of "Arial" and "Times" instead of "Times New Roman", that worked for me with R 3.6.1 and ggplot in Windows 10.
https://stackoverflow.com/a/35465167/10125052
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With