Skip to contents

[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.

Value

A character vector with fonts/typeface names.

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")

See also

Examples

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

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

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

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

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