Skip to contents

Figures produced by gfplot use Arial. The raster devices supplied by ragg and the quartz device on macOS resolve system fonts such as Arial directly, so most output needs no preparation at all. The base pdf() device keeps its own font table and needs the family registered with it, which extrafont does.

Usage

gfplot_font_setup(font = "Arial", quiet = FALSE)

Arguments

font

Font family to check.

quiet

Suppress the report.

Value

A named logical vector, invisibly, with one entry per device route: raster (ragg PNG/TIFF/JPEG), quartz (macOS PDF and screen), and pdf (base pdf()). These are the routes gfplot_save() chooses between.

Details

This function reports which routes work in the current session and, when vector PDF output would otherwise be unavailable, registers the font with extrafont so that pdf() can use it.

See also

gfplot_save() to write a figure using a device that can render the font, and plot_KMCurve() for the font argument.

Examples

gfplot_font_setup()
#> Figure font "Arial" can be rendered by:
#> • ragg raster devices (PNG, TIFF, JPEG): no
#> • quartz (macOS PDF and screen): no
#> • base pdf(): no
#> ℹ gfplot_save() picks a route that can render the font.