Skip to main content

encode_glyph_run

Function encode_glyph_run 

Source
pub(crate) fn encode_glyph_run(
    plan: &EmbeddedFontPlan,
    glyphs: &[ShapedGlyph],
    size_pt: f32,
    origin_x_pt: f32,
    origin_y_pt: f32,
) -> Vec<ContentOp>
Expand description

Encode shaped glyphs into PDF text-content operations. Each ShapedGlyph::gid is remapped through plan.remapper to its subset CID. GPOS advances become TJ adjustments; glyphs with GPOS offsets get their own absolute Tm so marks draw at the shaped position and the next glyph resumes from the un-offset pen.