Skip to main content

finalize_subrun

Function finalize_subrun 

Source
fn finalize_subrun(
    font: Font,
    byte_range: Range<usize>,
    glyphs: Vec<ShapedGlyph>,
    parent_text: &str,
    size_pt: f32,
) -> WordSubRun
Expand description

Convert a (font, byte_range, parent-relative glyphs) triple into a fully-baked WordSubRun: slices parent_text to the sub-run’s local string, rebases glyph clusters to that local string, sums the advance.