| font_set | R Documentation |
Bundle font registration, HTML dependencies, and
font family names into a single object. Each argument accepts
a font_google() specification, a font_liberation() specification,
or a plain character string naming a system font already available.
The returned object provides fields ready to use with
ggplot2::theme() ($sans, $serif, $mono),
girafe(fonts = ...) or dsvg(fonts = ...) ($dsvg_fonts),
and girafe(dependencies = ...) ($dependencies).
font_set(sans = NULL, serif = NULL, mono = NULL, symbol = NULL)
sans |
font for sans-serif text. |
serif |
font for serif text. |
mono |
font for monospace text. |
symbol |
font for symbol text. |
An object of class font_set with elements:
character, the sans font family name (or NULL)
character, the serif font family name (or NULL)
character, the mono font family name (or NULL)
character, the symbol font family name (or NULL)
list of htmlDependency objects
named list of family names for dsvg()
named list of source labels
font_set_liberation(), font_set_auto()
Other font set functions:
font_google(),
font_liberation(),
font_set_auto(),
font_set_liberation()
fonts <- font_set(sans = font_liberation("sans"))
fonts$sans
fonts$dsvg_fonts
fonts$dependencies
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.