get_font_features: Get available OpenType features in a font
Description
This is a simply functions that returns the available OpenType feature tags
for one or more fonts. See font_feature() for
more information on how to use the different feature with a font.
Usage
get_font_features(
family = "",
italic = FALSE,
bold = FALSE,
path = NULL,
index = 0
)
Value
A list with an element for each of the input fonts containing the
supported feature tags for that font.
Arguments
family
The name of the font families to match
italic
logical indicating the font slant
bold
logical indicating whether the font weight
path, index
path an index of a font file to circumvent lookup based on
family and style
# Select a random font on the systemsys_fonts <- systemfonts::system_fonts()
random_font <- sys_fonts$family[sample(nrow(sys_fonts), 1)]
# Get the featuresget_font_features(random_font)