Enum font_kit::family_name::FamilyName
source · pub enum FamilyName {
Title(String),
Serif,
SansSerif,
Monospace,
Cursive,
Fantasy,
}
Expand description
A possible value for the font-family
CSS property.
These descriptions are taken from CSS Fonts Level 3 § 3.1: https://drafts.csswg.org/css-fonts-3/#font-family-prop.
TODO(pcwalton): system-ui
, emoji
, math
, fangsong
Variants§
Title(String)
A specific font family, specified by name: e.g. “Arial”, “times”.
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 (vertical and horizontal stems have the close to the same thickness) and have stroke endings that are plain — without any flaring, cross stroke, or other ornamentation.
Monospace
The sole criterion of a monospace font is that all glyphs have the same fixed width.
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.
Trait Implementations§
source§impl Clone for FamilyName
impl Clone for FamilyName
source§fn clone(&self) -> FamilyName
fn clone(&self) -> FamilyName
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FamilyName
impl Debug for FamilyName
source§impl Hash for FamilyName
impl Hash for FamilyName
source§impl PartialEq for FamilyName
impl PartialEq for FamilyName
source§fn eq(&self, other: &FamilyName) -> bool
fn eq(&self, other: &FamilyName) -> bool
self
and other
values to be equal, and is used
by ==
.