Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New R (3.4) introduces errors when using showtext #12

Closed
thomasjwood opened this issue Apr 25, 2017 · 3 comments
Closed

New R (3.4) introduces errors when using showtext #12

thomasjwood opened this issue Apr 25, 2017 · 3 comments

Comments

@thomasjwood
Copy link

In the previous R version (3.3.3), this

library(ggplot2)
library(showtext)

font.add.google("Lato")

p1 <- ggplot(diamonds, aes(depth, price)) +
  geom_point() +
  theme_minimal(base_family = "Lato")

showtext.auto()
ggsave(plot = p1, "trial.pdf")

works:

image

but in the version of R (3.4) you instead get

Error in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y,  : 
  invalid font type
@yixuan
Copy link
Owner

yixuan commented Apr 25, 2017

Did you try to reinstall the package using R 3.4?

@thomasjwood
Copy link
Author

That fixed it--thanks! Sorry for the false alarm.

@yixuan
Copy link
Owner

yixuan commented Apr 25, 2017

No problem. Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants