detect_plot_font: Detect available sans-serif font for plots

View source: R/forest_utils.R

detect_plot_fontR Documentation

Detect available sans-serif font for plots

Description

Checks for commonly available sans-serif fonts in order of preference (Helvetica, Arial, Helvetica Neue) and returns the first available one. Falls back to "sans" if none are found or if systemfonts is unavailable.

Usage

detect_plot_font()

Details

When ragg is being used as the graphics device (detected via options or knitr settings), font detection works in non-interactive sessions since ragg handles font rendering independently of the R graphics system.

Value

Character string with the font family name to use.


summata documentation built on May 7, 2026, 5:07 p.m.