Registers the Ubuntu fonts bundled with fmutils and turns on showtext
so graphs can use them.
Details
The function registers three families with sysfonts::font_add():
"Ubuntu" (regular, bold, italic, bold italic), "Ubuntu Light", and
"Ubuntu Medium".
Inside a knitr or Quarto render, it sets the fig.showtext chunk option
instead of calling showtext::showtext_auto(). knitr then sets the
showtext resolution from each chunk's dpi (times fig.retina), so text
keeps its size at any figure resolution. Outside knitr, it calls
showtext::showtext_opts(dpi = dpi) and showtext::showtext_auto().
Examples
load_fm_fonts()
"Ubuntu" %in% sysfonts::font_families()
#> [1] TRUE