Enum cosmic_text::Family
source · pub enum Family<'a> {
Name(&'a str),
Serif,
SansSerif,
Cursive,
Fantasy,
Monospace,
}
Expand description
A font family.
Variants§
Name(&'a str)
The name of a font family of choice.
This must be a Typographic Family (ID 16) or a Family Name (ID 1) in terms of TrueType. Meaning you have to pass a family without any additional suffixes like Bold, Italic, Regular, etc.
Localized names are allowed.
Serif
Serif fonts represent the formal text style for a script.
SansSerif
Glyphs in sans-serif fonts, as the term is used in CSS, are generally low contrast and have stroke endings that are plain — without any flaring, cross stroke, or other ornamentation.
Cursive
Glyphs in cursive fonts generally use a more informal script style, and the result looks more like handwritten pen or brush writing than printed letterwork.
Fantasy
Fantasy fonts are primarily decorative or expressive fonts that contain decorative or expressive representations of characters.
Monospace
The sole criterion of a monospace font is that all glyphs have the same fixed width.