Skip to contents

Select local font families for body text, exported figures and HTML headings.

Usage

set_style(x, font_family = c("system", "sans", "serif", "mono"),
          heading_family = c("serif", "system", "sans", "mono"))

Arguments

x

An atlas object.

font_family

Local family for body and figure text.

heading_family

Local family for HTML headings.

Details

Choices are system, sans (Arial/Helvetica), serif (Georgia), and mono. No fonts are downloaded or embedded, so exact appearance depends on fonts installed on the viewing computer. Body and figure text use font_family; HTML headings use heading_family. as_ggplot maps choices to local graphics-device sans, serif or mono families. This function replaces both font settings; unspecified arguments return to their defaults.

Value

An offline_atlas object, suitable for piping into another configuration function or export_html.

See also

set_controls, set_legend, as_ggplot.

For the tutorial, see the offlineatlas package overview.

Examples

m <- atlas("Local typography") |>
  set_style(font_family = "sans", heading_family = "sans")