drawGlyphs

abstract fun drawGlyphs(glyphs: List<TextGlyph>, fontSize: Double, unitsPerEm: Int, hasOutlines: Boolean, fontSpec: FontSpec, textToDevice: KiteMatrix, color: RgbColor, alpha: Double = 1.0, blendMode: KiteBlendMode = KiteBlendMode.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 advanceWidth * fontSize / 1000 + advanceAdjust (the adjust term carries character/word spacing), and paint under textToDevice. Non-embedded fonts (hasOutlines = false) carry no outlines; render TextGlyph.text through a host typeface chosen from fontSpec. The pen still advances by the document's numbers above, not by the host face's own metrics (ISO 32000-1, 9.4.4).