pub struct LayoutGlyph {Show 15 fields
pub start: usize,
pub end: usize,
pub font_size: f32,
pub line_height_opt: Option<f32>,
pub font_id: ID,
pub glyph_id: u16,
pub x: f32,
pub y: f32,
pub w: f32,
pub level: Level,
pub x_offset: f32,
pub y_offset: f32,
pub color_opt: Option<Color>,
pub metadata: usize,
pub cache_key_flags: CacheKeyFlags,
}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
line_height_opt: Option<f32>Line height of the glyph, will override buffer setting
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