#[non_exhaustive]pub struct Glyph<T> {
pub user_data: T,
pub codepoint: char,
pub rotated: bool,
pub left: f32,
pub right: f32,
pub bottom: f32,
pub top: f32,
pub tex_left: f32,
pub tex_right: f32,
pub tex_top: f32,
pub tex_bottom: f32,
}Expand description
Metadata for a glyph that was rendered in an asset.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.user_data: TThe user_data from the GlyphRequest.
codepoint: charThe codepoint that was rendered.
rotated: boolWhether rotation was applied when this glyph was packed.
left: f32The relative left edge of a bounding box from the glyph’s 0 position that will position the resulting SDF so that the middle distance describes a character as specified by the font.
right: f32The relative right edge of a bounding box from the glyph’s 0 position that will position the resulting SDF so that the middle distance describes a character as specified by the font.
bottom: f32The relative bottom edge of a bounding box from the glyph’s 0 position that will position the resulting SDF so that the middle distance describes a character as specified by the font.
top: f32The relative top edge of a bounding box from the glyph’s 0 position that will position the resulting SDF so that the middle distance describes a character as specified by the font.
tex_left: f32The left edge of the rendered glyph as a texture coordinate
tex_right: f32The right edge of the rendered glyph as a texture coordinate
tex_top: f32The top edge of the rendered glyph as a texture coordinate
tex_bottom: f32The bottom edge of the rendered glyph as a texture coordinate