Register font using sysfonts::font_add
and systemfonts::register_font
Source: R/fonts.R
register_font_df.Rd
Registration with sysfonts::font_add
exclusively works for showtext
, while
systemfonts::register_font
is required for the calculation of string widths, for instance.
The family name must be unique across the two registrations, so the systemfonts
registration
uses a suffix behind the family name.
Usage
register_font_df(
font_df = RUBer::get_font_df(),
systemfonts_suffix = "_systemfonts"
)
Arguments
- font_df
Data frame with one row obtained by
RUBer::get_font_df()
- systemfonts_suffix
Suffix attached to the font family name in
systemfonts::register_font