Closed cbrnr closed 2 years ago
Try using {ragg}
by adding the following to the top of your app
library(ragg)
options(shiny.useragg = TRUE)
Thank you, that solved the issue! Maybe a small in the docs could be helpful? I know that the README mentions that "themes with custom fonts works best if you have {showtext} and/or {ragg} installed", but maybe this could be a stronger statement? I didn't even know that I was using custom fonts (and maybe I didn't, at least I never explicitly specified a particular font).
Describe the problem
I'm using
bslib::bs_theme(bootswatch="flatly")
together withthematic::thematic_shiny(font="auto")
to make my figures look like the rest of the Shiny website. However, for some reason the labels in a figure are way too small initially. Once I resize the browser window a little bit, the figure adapts and shows the labels using the correct (larger) font size.Here's a minimal Shiny app to reproduce this issue:
Here's a screenshot of the website deployed to our own server (notice how the figure labels are very small):
And here's the same website after resizing the browser window a little (the figure labels are now larger as they should be):
Interestingly, running the app locally does not reproduce this issue. I couldn't reproduce the issue when deploying on shinyapps.io either, but I did run into the same problem with a bit more complex app.
I'm not even sure that this issue is related to
thematic
, so please let me know if this is some other package's problem (or even something I'm doing wrong).Session Info