Struct i_slint_core::textlayout::Glyph
source · pub struct Glyph<Length> {
pub advance: Length,
pub offset_x: Length,
pub offset_y: Length,
pub glyph_id: Option<NonZeroU16>,
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: Length§offset_x: Length§offset_y: Length§glyph_id: Option<NonZeroU16>Glyph IDs are font specific identifiers. In TrueType fonts zero indicates the missing glyph, which is mapped to an Option here.
text_byte_offset: usizeThe 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.