fontcm icon indicating copy to clipboard operation
fontcm copied to clipboard

ring(A) produces A without ring

Open khouli opened this issue 10 years ago • 3 comments

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:

expression(paste("Standard Deviation (", ring(A), ")"))

Is ring() supported by fontcm? Thanks.

khouli avatar Apr 24 '15 15:04 khouli

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")

wch avatar Apr 27 '15 15:04 wch

I tried exactly what you posted. It looks like I was mistaken about it not working at all but I do get this weirdness:

computer modern ring(A)

(R didn't report any errors -- it seemed happy with the "CM Roman" font family.)

khouli avatar Apr 29 '15 16:04 khouli

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.

image

What platform are you on, and what viewer are you using?

wch avatar Apr 29 '15 19:04 wch