PdfTextSpan

data class PdfTextSpan(val text: String, val fontSpec: FontSpec, val fontSize: Double, val origin: Pair<Double, Double>, val bounds: Rectangle, val charEdgePoints: List<Pair<Double, Double>>? = null)

One renderer-drawText worth of glyphs that share font, size, and baseline. Position is the device-space origin (where the baseline starts).

Constructors

Link copied to clipboard
constructor(text: String, fontSpec: FontSpec, fontSize: Double, origin: Pair<Double, Double>, bounds: Rectangle, charEdgePoints: List<Pair<Double, Double>>? = null)

Properties

Link copied to clipboard

Approximate bounding box (baseline + ascender heuristic).

Link copied to clipboard

text.length + 1 user-space baseline points: entry i is where char i starts, the last entry where the run ends. A multi-char glyph (ligature) splits its advance evenly across its chars. Null when the producer didn't record geometry (the KiteTextAdapter falls back to an even split of bounds).

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Baseline-space origin in PDF user units.

Link copied to clipboard