The two versions of this function are equivalent, but the "underscore" naming is preferred.

This function lists font families currently available that can be used by R2SWF and showtext packages.

font_families()

font.families()

Value

A character vector of available font family names.

Details

By default there are three font families loaded automatically, i.e., "sans", "serif" and "mono". If one wants to use other fonts, font_add() needs to be called to register new fonts by specifying a family name and corresponding font files. See font_add() for details about the meaning of "family name" in this context, as well as a complete example of registering and using a new font.

See also

Author

Yixuan Qiu <https://statr.me/>

Examples

font_families()
#> [1] "sans"  "serif" "mono"