API reference / Common / Engine types / TextStyle
Interface: TextStyle
PDF text-state operators grouped into one struct — Tf, Tc, Tw, Tz, TL, Tr, Ts, Tk.
One TextStyle lives on each TextRegularRun, grouping every text-state operator's contribution into a single struct rather than spreading them across many TextRegularRun fields. Stroke / fill paint colors, soft mask, and call-uniform compositing live on the matching *Style fields of TextRegularRun, not here.
Properties
| Property | Description |
|---|---|
fontstring | PDF Tf — font. Always resolvable: every udoc graphics-object resource reference points at a registry entry. Importers are responsible for guaranteeing this — for PDF, every paint- producing text run comes from either a page content stream (where /Tj requires /Tf first) or a Do invocation that inherits the caller's font, so the font is always known by the time a run reaches the udoc model. |
fontSizenumber | PDF Tf — font size, in text-space units. |
charSpacingnumber | PDF Tc — additional horizontal advance per glyph. |
wordSpacingnumber | PDF Tw — additional horizontal advance per word space. |
horizontalScalingnumber | PDF Tz — horizontal scaling (percent, 100.0 is unscaled). |
leadingnumber | PDF TL — line leading. |
risenumber | PDF Ts — text rise (vertical offset from baseline). |
renderModeTextRenderingMode | PDF Tr — text rendering mode (which of fill / stroke / both the run paints). |
knockoutboolean | PDF Tk — text knockout (whether glyphs in a single BT…ET block knock each other out where they overlap). |