Headless variable-font instances

Use HPDFHeadlessFontInstance to inspect axes and create one complete static OpenType instance from original TrueType or OpenType CFF2 bytes

Coordinates and one-instance ownership

HPDFGetHeadlessFontAxes returns each four-byte axis tag and its minimum, default, and maximum values; THPDFHeadlessFontCoordinates carries selected tag/value pairs

Omitted coordinates use the source default; finite values outside an axis range are clamped to that range; duplicate tags, unknown tags, non-finite values, and more than 64 selections are errors

HPDFInstantiateHeadlessFont returns static font bytes; HPDFInstantiateHeadlessFontBounded additionally accepts an explicit working-admission limit

Each call starts from its supplied original bytes, so requesting defaults after a nondefault instance does not reuse previous variation state

HPDFBuildHeadlessVariableTextAppearance in HPDFHeadlessVariableAppearance creates one instance and passes those same bytes to character mapping, shaping, horizontal advances, outline conversion, and font embedding

Complex shaping retains the existing scale-1000 integer-advance contract and the matching-architecture HarfBuzz and FriBidi dependencies; it does not promise ideal unquantized unitsPerEm advances

Names, notices, and embedding

The headless instance receives a deterministic HPDFVar- PostScript name while preserving original name records and copyright and license information

The appearance path supplies the original font separately to Notice construction, so the embedded CFF 1 Notice retains the original name-table bytes rather than substituting the renamed instance table

The variable appearance entry requires installable or editable outline embedding permission and verifies that the instance has the same embedding flags; it does not use the broader preview-and-print permission policy of every other appearance entry

Limits and cancellation

The font byte limit bounds source and published output; the bounded entry also checks cumulative working-allocation admission and forwards cancellation checks into the CFF2 or TrueType instance engine

The convenience entry uses a 64 MiB working-admission limit; admission is a conservative accounting limit, not a measurement of instantaneous heap usage or a promise that every allocator failure has been injected in tests

Static output retains glyph identity and original embedding authorization and removes resolved variation state; invalid or unrepresentable output is not returned as a partially valid instance

See controlled TrueType instancing, raw CFF2 with companion tables, and CFF2 appearance conversion