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
However, warnings are generated once transition_time() is called. The fonts still appear, but raising an issue in case this is indicative of a deeper problem.
p+ transition_time(year)
#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : no#> font could be found for family "Source Sans Pro"#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : no#> font could be found for family "Source Sans Pro"#> Warning: Cannot get dimensions of plot table. Plot region might not be fixed
However, this problem goes away if I install Source Sans Pro on my machine directly. Thus it appears to be something related to how showtext and gganimate work on the backend.
showtext hacks into the current graphic device and it is very likely that the multiple calls gganimate has to do somehow messes up showtext. I'm not going to do something special to accommodate the showtext hack as there are now much better and supported ways to get modern font support in R (e.g. using the ragg devices)
When using
showtext
to access and use Google fonts inggplot2
, I am getting missing font warnings when usinggganimate::transition_time()
.Plotting a static plot works as expected.
However, warnings are generated once
transition_time()
is called. The fonts still appear, but raising an issue in case this is indicative of a deeper problem.However, this problem goes away if I install Source Sans Pro on my machine directly. Thus it appears to be something related to how
showtext
andgganimate
work on the backend.Session info
The text was updated successfully, but these errors were encountered: