Skip to contents

Build a font_set() by detecting the best available system fonts for each role (sans, serif, mono, symbol).

For each role a list of well-known fonts is tried in order. When none is found on the system, the corresponding Liberation font is used as a guaranteed offline fallback.

RoleCandidates (in order)Fallback
sansArial, Helvetica, DejaVu SansLiberation Sans
serifTimes New Roman, Times, DejaVu SerifLiberation Serif
monoCourier New, Courier, DejaVu Sans MonoLiberation Mono
symbolSymbol, Apple SymbolsLiberation Sans

Usage

font_set_auto()

Value

An object of class font_set.

Examples

fonts <- font_set_auto()
fonts
#> Font set
#>   sans:    DejaVu Sans [system]
#>   serif:   DejaVu Serif [system]
#>   mono:    DejaVu Sans Mono [system]
#>   symbol:  Symbol [system]
#>   4 HTML dependencies