THPDFHeadlessTextAppearanceOptions
Options in HPDFHeadlessAppearance for Unicode Form XObjects with measured layout and optional complex shaping
| Field | Default and contract |
|---|---|
Width, Height | 200 by 30 PDF units; document filling derives these values from each widget rectangle |
FontSize | 12 PDF units; zero requests auto-fit with a maximum of 12 |
Padding | 2 units on each edge, leaving a positive inner clip rectangle |
TextColor[0..2] | Black RGB components, each from zero through one |
PaintWhiteBackground | True, painting the complete widget background white |
Alignment | htaLeft; supports center and right, with inherited field Q taking precedence during document filling |
Multiline, WrapText | False and True; CR/LF paragraph breaks and measured logical-line wrapping, with document filling deriving multiline mode from the field flags |
CombCells | Zero; a positive value centers direct scalar glyphs in individual cells, derived from MaxLen for comb text fields |
Rotation | Zero; multiples of 90 degrees normalized modulo 360, derived from widget MK.R during document filling |
LineSpacing | 1.2 times font size, bounded from 1 through 10 |
CharacterSpacing, WordSpacing | Zero PDF points; finite positive or negative spacing bounded by an absolute value of 1000000, with word spacing applied to U+0020 and character spacing applied once after each direct scalar or shaped cluster, including the last cluster |
ShapeComplexText | True; loads matching HarfBuzz and FriBidi runtimes only when complex text requires shaping |
FallbackFontFamilies | False; True enables complete-grapheme font fallback across explicitly supplied rich-text families, with original values and authored styles retained; the single-font text builder does not search other families |
HighlightLines | Empty dynamic integer array; each nonnegative visible line index paints a blue background, with row count bounded by MaxGlyphs and offscreen rows clipped |
HighlightLine | -1; a nonnegative visible line index paints a blue selection background for list box appearances |
Border | habNone; habRectangle or habCircle paints a bounded button outline |
MaxFontBytes | 8 MiB across selected programs and candidate programs inspected during supplied-family fallback |
MaxObjectBytes | 16 MiB per dictionary or stream including its payload |
MaxGlyphs | 65535 input scalars and generated glyphs, bounded by the 16-bit CID space |
CancellationToken | Nil or a caller-owned token that stays alive throughout the operation |
Dimensions, padding, and font size must be finite; dimensions and a nonzero font size are bounded from 0.000001 through 1000000 units, and the inner clip rectangle must remain at least 0.000001 units on each axis
Auto-fit that would serialize a zero font size is rejected, while fixed-size text is clipped to the inner widget rectangle
Text spacing participates in measured widths, alignment, wrapping, and auto-fit; generated CID text uses absolute glyph positioning because PDF Tw does not apply to a two-byte Identity-H space code
Document filling further caps object and glyph budgets by document options, caps font size in bytes by the decoded-stream budget, and admits the aggregate new objects against the remaining file budget