Type Alias theme_parser::parser::pff2::Font

source ·
pub type Font = Pff2<Validated>;
Expand description

A font object that is supposed to be validated after the file was read. Instead of constructing this youself, make a Parser and call validate on it.

Aliased Type§

struct Font {
    pub name: String,
    pub family: String,
    pub point_size: u16,
    pub weight: String,
    pub max_char_width: u16,
    pub max_char_height: u16,
    pub ascent: u16,
    pub descent: u16,
    pub leading: u16,
    pub glyphs: Rc<[Glyph]>,
    /* private fields */
}

Fields§

§name: String

Font name. Usually includes family, point size and weight

§family: String

Font family

§point_size: u16

Size of the font

§weight: String

Weight could be anything like normal, bold or italic

§max_char_width: u16

The dimetions of the glyphs

§max_char_height: u16

The dimetions of the glyphs

§ascent: u16

The highest point on the glyph (like the top of M)

§descent: u16

The lowest point on the glyph (like the bottom of g)

§leading: u16

The distance between baselines

§glyphs: Rc<[Glyph]>

A list of glyphs that are in the font