Struct immi::GlyphInfos [] [src]

pub struct GlyphInfos {
    pub width: f32,
    pub height: f32,
    pub x_offset: f32,
    pub y_offset: f32,
    pub x_advance: f32,
}

Information about a single glyph.

All the values of this struct must be relative to the size of an EM, so that the library can adjust the values to any size.

Fields

Width of the glyph in pixels, divided by the number of pixels of an EM.

Height of the glyph in pixels, divided by the number of pixels of an EM.

By definition, this value is supposed to be always 1.0 for the glyph 'M'. In practice this is not always exactly true.

Number of pixels from the end of the previous glyph to the start of this one, divided by the number of pixels of an EM.

Number of pixels from the base of the line to the top of this one, divided by the number of pixels of an EM.

For glyphs that don't go under the line (like 'm' or 'u' for example), this is equal to the height of the glyph. For glyphs that go under the line (like 'p' or 'g'), this is equal to the height of the glyph minus the portion that goes under the line.

Number of pixels from the end of the previous glyph to the end of this one, divided by the number of pixels of an EM.

Should always be superior to width + x_offset.

Trait Implementations

impl Debug for GlyphInfos
[src]

Formats the value using the given formatter.

impl Copy for GlyphInfos
[src]

impl Clone for GlyphInfos
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more