check_fonts_in_r | R Documentation |
Test if fonts are available on the system and import them in R
check_fonts_in_r(
fonts = c("Marianne", "Spectral"),
import = TRUE,
verbose = TRUE
)
fonts |
Vector of fonts. |
import |
Logical. Whether to import |
verbose |
List fonts to install if needed. |
For fonts to be used, they need to be installed on the machine.
## Not run:
check_fonts_in_r(import = FALSE)
# Test if working
library(ggplot2)
ggplot(mtcars) + geom_point(aes(cyl, mpg)) + labs(title = "Mon titre avec Marianne",
x = "lab X avec Spectral", y = "Lab Y avec Spectral") +
theme(title = element_text(family = "Marianne"),
axis.title.x = element_text(family = "Spectral"),
axis.title.y = element_text(family = "Spectral"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.