yixuan / showtext

Using Fonts More Easily in R Graphs
http://cran.r-project.org/web/packages/showtext/index.html
478 stars 38 forks source link

Google fonts don't show on my chart, only my system default #24

Closed chrismp closed 6 years ago

chrismp commented 6 years ago

I am using RStudio Debian 9.3 I ran this code:

library(showtext)
font_add_google("Lobster", "lobster")

showtext_auto()

plot(1, pch = 16, cex = 3)
text(1, 1.1, "A fancy dot", family = "lobster", col = "steelblue", cex = 3)

And I saw this in the "Plots" section of RStudio. rplot01

Any idea why the font displays wrong?

yixuan commented 6 years ago

Hi, this is a known limitation: https://github.com/yixuan/showtext/issues/7. I am afraid currently there is no good way to get rid of it, so I suggest explicitly opening a default graphics window.