Legacy XFA Unicode text appearances

THotPDF.ApplyXFAAsAcroForm creates embedded-font native appearances for text, numeric, date and password fields when FormAppearancesWanted is enabled through AutoFormAppearances or PDF 2.0 output

The text appearance preserves the effective per-instance font family, regular, bold, italic or bold-italic face, font size, text colour, alignment, multiline wrapping and border width and colour

Font programs come from the actual installed Windows family and face, without synthesised bold or italic; Helvetica, Times or Times-Roman, and Courier labels resolve to Arial, Times New Roman and Courier New respectively

Each saved field retains Unicode V and DV and an editable DA that resolves to its embedded Type0 font through AcroForm DR

Password fields keep their authored value and paint one asterisk for each Unicode scalar, including a supplementary character represented by a surrogate pair; password appearance masking does not encrypt the field value

Repeated instances retain their own effective values and font properties after runtime script edits, SaveToBytes, reload and application to THotPDF; an event rollback restores both values and effective styles

Preparation checks input, font, glyph, object and serialised-byte budgets before adopting any native appearance objects; each field adoption is transactional and cancellation restores the prior graph, annotation identity, deferred font wiring and page resource caches

A subsequent retry can draw earlier page text and new text with valid restored font references

This installed-font consumer belongs to the Windows THotPDF path; portable XFA clients receive the same UTF-8 family and style hints and can supply their own font programs

The additive emission style keys are textfonttypefacehex for the UTF-8 family bytes, textfontbold=1 and textfontitalic=1; the existing font key remains available

Radio groups, legacy choice fields and rich text body consumers have separate implementation paths