Registers a font family for use in ggplot2 plots and updates
the default font for text and label geoms. Three font families are
bundled with the package for offline use: "Open Sans",
"Lato", and "Source Sans 3". Any Google Font can be
loaded when an internet connection is available.
Usage
set_fonts(base_family = "Open Sans", font_method = c("showtext", "extrafont"))Value
Invisible NULL. Called for its side effects of
registering fonts and enabling automatic rendering.
Details
Two rendering backends are supported:
"showtext"(Default, recommended.) Uses sysfonts and showtext. Bundled fonts are loaded from TTF files in
inst/fonts/; other fonts are fetched viafont_add_google."extrafont"(Legacy.) Uses the extrafont package. May require
font_importon first use.
