Enum font_kit::family_name::FamilyName[][src]

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.