Open khouli opened 9 years ago
It seems to work for me:
library(ggplot2)
library(extrafont)
pdf("ggplot_cm.pdf", width=4, height=4)
ggplot(mtcars, aes(wt, mpg)) + geom_point() +
theme(text = element_text(size=16, family="CM Roman")) +
xlab(expression(paste("Standard Deviation (", ring(A), ")")))
dev.off()
embed_fonts("ggplot_cm.pdf", outfile="ggplot_cm.pdf")
I tried exactly what you posted. It looks like I was mistaken about it not working at all but I do get this weirdness:
(R didn't report any errors -- it seemed happy with the "CM Roman" font family.)
This is what the PDF looks like for me on Ubuntu Linux 14.04. I took a screenshot because apparently it's not possible to add a PDF to these comments.
What platform are you on, and what viewer are you using?
Hello, thanks for making this. I just tried using ring(A) in ggplot2 with the CM font and got an unadorned A. This is snippet that produced that:
Is ring() supported by fontcm? Thanks.