Wraps ggplot2::ggsave()
while activating showtext only for this call,
ensuring font rendering without leaving global side effects.
Examples
if (requireNamespace("ggplot2", quietly = TRUE)) {
p <- ggplot2::qplot(wt, mpg, data = mtcars)
ggsave_st("example.png", p)
}
#> Warning: `qplot()` was deprecated in ggplot2 3.4.0.
#> Saving 6.67 x 6.67 in image