get_brand_font: Get brand fonts/typefaces

View source: R/get_brand.R

get_brand_fontR Documentation

Get brand fonts/typefaces

Description

[Maturing]

get_brand_font() retrieves the names of fonts/typefaces in the ⁠_brand.yml⁠ file.

Usage

get_brand_font(font)

Arguments

font

A character vector indicating the name of fonts/typefaces categories present in the typography section of the ⁠_brand.yml⁠ file.

Details

Path to ⁠_brand.yml⁠

brandr will always look for a ⁠_brand.yml⁠ file in the root directory of your project. If the file is not found, an error message will be displayed. You can also set the path to the file manually using the options() function:

options(BRANDR_BRAND_YML = "PATH_TO_BRAND.YML")

Value

A character vector with fonts/typeface names.

See Also

Other utility functions: get_brand_color(), get_brand_color_mix(), get_brand_color_tint()

Examples

get_brand_font("base")
#> [1] "Open Sans" # Expected

get_brand_font("headings")
#> [1] "Rubik" # Expected

get_brand_font("monospace")
#> [1] "IBM Plex Mono" # Expected

get_brand_font("monospace-block")
#> [1] "IBM Plex Mono" # Expected

get_brand_font(c("base", "headings"))
#> [1] "Open Sans" "Rubik" # Expected

brandr documentation built on April 4, 2025, 5:30 a.m.