logo
pub struct Glyph<Length, PlatformGlyphData> {
    pub advance: Length,
    pub offset_x: Length,
    pub offset_y: Length,
    pub platform_glyph: PlatformGlyphData,
    pub text_byte_offset: usize,
}
Expand description

This struct describes a glyph from shaping to rendering. This includes the relative shaping offsets, advance (in abstract lengths) and platform specific glyph data.

Fields

advance: Lengthoffset_x: Lengthoffset_y: Lengthplatform_glyph: PlatformGlyphDatatext_byte_offset: usize

The byte offset back in the original (Rust) string to the character that “produced” this glyph. When one character produces multiple glyphs (for example decomposed ligature), then all glyphs have the same offset.

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

Returns the “default value” for a type. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

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

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.