get_fallback_font_df: Get system dependent fallback font if a given font is not...

View source: R/fonts.R

get_fallback_font_dfR Documentation

Get system dependent fallback font if a given font is not available

Description

This functions returns the system dependent font for the alias "sans".

Usage

get_fallback_font_df(
  fonts = systemfonts::system_fonts(),
  fallback_alias = "sans"
)

Arguments

fonts

Data frame obtained by systemfonts::system_fonts

fallback_alias

Character, one of c("sans", "serif", "mono", "emoji") defaults to "sans".

Details

The aliases are mapped the following way:

  • "" and "sans" return Helvetica on Mac, Arial on Windows, and the default sans-serif font on Linux (DejaVu Sans on Ubuntu)

  • "serif" return Times on Mac, Times New Roman on Windows, and the default serif font on Linux (DejaVu Serif on Ubuntu)

  • "mono" return Courier on Mac, Courier New on Windows, and the default mono font on Linux (DejaVu Mono on Ubuntu)

  • "emoji" return Apple Color Emoji on Mac, Segoe UI Emoji on Windows, and the default emoji font on Linux (Noto Color on Ubuntu)

See https://github.com/r-lib/systemfonts for details

Value

Data frame obtained by systemfonts::system_fonts with one row

Examples

get_fallback_font_df()

RichardMeyer-Eppler/RUBer documentation built on June 2, 2022, 7:24 p.m.