THPDFHeadlessTextAppearanceOptions

Options in HPDFHeadlessAppearance for Unicode Form XObjects with measured layout and optional complex shaping

FieldDefault and contract
Width, Height200 by 30 PDF units; document filling derives these values from each widget rectangle
FontSize12 PDF units; zero requests auto-fit with a maximum of 12
Padding2 units on each edge, leaving a positive inner clip rectangle
TextColor[0..2]Black RGB components, each from zero through one
PaintWhiteBackgroundTrue, painting the complete widget background white
AlignmenthtaLeft; supports center and right, with inherited field Q taking precedence during document filling
Multiline, WrapTextFalse and True; CR/LF paragraph breaks and measured logical-line wrapping, with document filling deriving multiline mode from the field flags
CombCellsZero; a positive value centers direct scalar glyphs in individual cells, derived from MaxLen for comb text fields
RotationZero; multiples of 90 degrees normalized modulo 360, derived from widget MK.R during document filling
LineSpacing1.2 times font size, bounded from 1 through 10
CharacterSpacing, WordSpacingZero 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
ShapeComplexTextTrue; loads matching HarfBuzz and FriBidi runtimes only when complex text requires shaping
FallbackFontFamiliesFalse; 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
HighlightLinesEmpty 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
BorderhabNone; habRectangle or habCircle paints a bounded button outline
MaxFontBytes8 MiB across selected programs and candidate programs inspected during supplied-family fallback
MaxObjectBytes16 MiB per dictionary or stream including its payload
MaxGlyphs65535 input scalars and generated glyphs, bounded by the 16-bit CID space
CancellationTokenNil 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