drawGlyphs

abstract fun drawGlyphs(glyphs: List<TextGlyph>, fontSize: Double, unitsPerEm: Int, hasOutlines: Boolean, fontSpec: FontSpec, textToDevice: Matrix, color: RgbColor, alpha: Double = 1.0, blendMode: BlendMode = BlendMode.Normal)

Paint one text run, already laid out into glyphs by the document handler. Format-neutral: no PDF (or other) font object crosses the seam, so every handler (PDF, EPUB, and others) drives text the same way.

Embedded fonts (hasOutlines = true) carry a resolved TextGlyph.outline per glyph; scale each by fontSize/unitsPerEm, advance the pen by TextGlyph.advanceWidth (1/1000 em), and paint under textToDevice. Non-embedded fonts (hasOutlines = false) carry no outlines; render TextGlyph.text through a host typeface chosen from fontSpec.