TextGlyph
data class TextGlyph(val byteOffset: Int, val byteCount: Int, val gid: Int, val text: String, val advanceWidth: Double, val outline: KitePath?, val isWordSpace: Boolean, val xOffset: Double = 0.0, val yOffset: Double = 0.0)
One glyph laid out from a Tj / TJ show-text byte string.
The presence of TextGlyph lets the renderer walk a code-unit-aware sequence rather than iterating bytes one at a time. Type 0 composite fonts need this, because each glyph consumes 2 bytes (Identity-H) or other variable-length CMap encodings.
Simple fonts produce one TextGlyph per byte; CIDFonts produce one per (1- or 2-byte) code unit consumed from the input.