as_font_weight {systemfonts} | R Documentation |
Convert weight and width to numerics
Description
It is often more natural to describe font weight and width with names rather than numbers (e.g. "bold" or "condensed"), but underneath these names are matched to numeric values. These two functions are used to retrieve the numeric counterparts to names
Usage
as_font_weight(weight)
as_font_width(width)
Arguments
weight , width |
character vectors with valid names for weight or width |
Value
An integer vector matching the length of the input
Examples
as_font_weight(
c("undefined", "thin", "ultralight", "light", "normal", "medium", "semibold",
"bold", "ultrabold", "heavy")
)
as_font_width(
c("undefined", "ultracondensed", "extracondensed", "condensed", "semicondensed",
"normal", "semiexpanded", "expanded", "extraexpanded", "ultraexpanded")
)
[Package systemfonts version 1.1.0 Index]