pub struct ShapedRun {
pub font_data: Arc<Vec<u8>>,
pub font_index: u32,
pub glyphs: Vec<GlyphPosition>,
pub segments: Vec<ShapedSegment>,
pub width: f32,
}Expand description
A shaped paragraph of text.
font_data / font_index reflect the first segment’s font and
stay for renderer back-compat with the W3.6 single-font path. The
authoritative per-(font, level) breakdown lives in Self::segments.
font_data is the raw TTF/OTF bytes. Renderers wrap these in their own
font type (e.g. peniko::Font) and should cache by Arc::as_ptr.
Fields§
§font_data: Arc<Vec<u8>>TTF/OTF bytes of the resolved font face (first segment).
font_index: u32Face index inside the font file (0 for single-face TTF).
glyphs: Vec<GlyphPosition>All glyphs across every segment, in cosmic-text’s visual order.
Kept for back-compat with single-font renderer paths and tests;
new code should iterate Self::segments instead.
segments: Vec<ShapedSegment>Per-(font, BiDi level) maximal slices in logical order.
Non-empty whenever glyphs is non-empty.
width: f32Total advance of the run (logical pixels). For an empty input,
0.0. Includes trailing whitespace that may not appear in
glyphs. Use this - not glyphs.last().x - for end-of-run
caret placement.