Learn R Programming

brandr (version 0.1.0)

get_brand_font: 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)

Value

A character vector with fonts/typeface names.

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

See Also

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

Examples

Run this code
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

Run the code above in your browser using DataLab