pub struct SingleLineResult {
pub width: f32,
pub height: f32,
pub baseline: f32,
pub underline_offset: f32,
pub underline_thickness: f32,
pub glyphs: Vec<GlyphQuad>,
pub glyph_keys: Vec<GlyphCacheKey>,
pub spans: Vec<LaidOutSpan>,
}Expand description
Result of [crate::Typesetter::layout_single_line].
Contains the measured dimensions and GPU-ready glyph quads for a single line of text. No flow layout, line breaking, or bidi analysis is performed.
Fields§
§width: f32Total advance width of the shaped text, in pixels.
height: f32Line height (ascent + descent + leading), in pixels.
baseline: f32Distance from the top of the line to the baseline, in pixels.
underline_offset: f32Distance from baseline to the top of the underline, in logical
pixels. Positive = below the baseline. Sourced from the primary
font’s post table.
underline_thickness: f32Underline line thickness in logical pixels. Sourced from the primary font’s stroke size.
glyphs: Vec<GlyphQuad>GPU-ready glyph quads, positioned at y=0 (no scroll offset).
glyph_keys: Vec<GlyphCacheKey>Per-glyph cache keys, parallel to glyphs. Callers that cache
glyph output externally should pass these back to
[TextFontService::touch_glyphs] each frame to prevent the
atlas from evicting still-visible glyphs.
spans: Vec<LaidOutSpan>Per-span bounding rectangles for markup-aware layout
([crate::Typesetter::layout_single_line_markup]). Empty for
the plain-text layout path.