Struct font_kit::metrics::Metrics[][src]

pub struct Metrics {
    pub units_per_em: u32,
    pub ascent: f32,
    pub descent: f32,
    pub line_gap: f32,
    pub underline_position: f32,
    pub underline_thickness: f32,
    pub cap_height: f32,
    pub x_height: f32,
}

Various metrics that apply to the entire font.

For OpenType fonts, these mostly come from the OS/2 table.

Fields

The number of font units per em.

Font sizes are usually expressed in pixels per em; e.g. 12px means 12 pixels per em.

The maximum amount the font rises above the baseline, in font units.

The maximum amount the font descends below the baseline, in font units.

NB: This is typically a negative value to match the definition of sTypoDescender in the OS/2 table in the OpenType specification. If you are used to using Windows or Mac APIs, beware, as the sign is reversed from what those APIs return.

Distance between baselines, in font units.

The suggested distance of the top of the underline from the baseline (negative values indicate below baseline), in font units.

A suggested value for the underline thickness, in font units.

The approximate amount that uppercase letters rise above the baseline, in font units.

The approximate amount that non-ascending lowercase letters rise above the baseline, in font units.

Trait Implementations

impl Clone for Metrics
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Metrics
[src]

impl Debug for Metrics
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Metrics

impl Sync for Metrics