You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because you need to remove the overlaps for the fonts, if you use the static fonts in the repo it won't have this problem. Looks like it was answered on the stack overflow. The fonts served on google need the overlaps for variable fonts to work unfortunately.
Related to this question on stackoverflow:
https://stackoverflow.com/questions/66489793/ggplot-text-rendering-not-working-for-some-fonts
I have been trying to add a google font to my ggplots, but the text renders with lots of gaps in it. Does anyone know how to fix this?
Seems like it may be an operating system specific problem. I'm using: OS: MacOS Catalina 10.15.7 R version: 4.0.4
Here is an example with massive text to demonstrate the problem:
library(ggplot2)
library(sysfonts)
library(showtext)
font_add_google("Work Sans")
showtext_auto()
ggplot(mtcars, aes(wt, mpg)) +
geom_point()+
theme(text = element_text(family = "Work Sans", size =100),
axis.text = element_blank())
The text was updated successfully, but these errors were encountered: