Struct cosmic_text::LayoutGlyph
source · pub struct LayoutGlyph {}Expand description
A laid out glyph
Fields§
§start: usizeStart index of cluster in original line
end: usizeEnd index of cluster in original line
font_size: f32Font size of the glyph
font_id: IDFont id of the glyph
glyph_id: u16Font id of the glyph
x: f32X offset of hitbox
y: f32Y offset of hitbox
w: f32Width of hitbox
level: LevelUnicode BiDi embedding level, character is left-to-right if level is divisible by 2
x_offset: f32X offset in line
If you are dealing with physical coordinates, use Self::physical to obtain a
PhysicalGlyph for rendering.
This offset is useful when you are dealing with logical units and you do not care or cannot guarantee pixel grid alignment. For instance, when you want to use the glyphs for vectorial text, apply linear transformations to the layout, etc.
y_offset: f32Y offset in line
If you are dealing with physical coordinates, use Self::physical to obtain a
PhysicalGlyph for rendering.
This offset is useful when you are dealing with logical units and you do not care or cannot guarantee pixel grid alignment. For instance, when you want to use the glyphs for vectorial text, apply linear transformations to the layout, etc.
color_opt: Option<Color>Optional color override
metadata: usizeMetadata from Attrs
cache_key_flags: CacheKeyFlagsImplementations§
source§impl LayoutGlyph
impl LayoutGlyph
Trait Implementations§
source§impl Clone for LayoutGlyph
impl Clone for LayoutGlyph
source§fn clone(&self) -> LayoutGlyph
fn clone(&self) -> LayoutGlyph
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more