Raw CFF2 input with companion tables
HPDFHeadlessCFF2Input accepts an original CFF2 table together with caller-supplied original OpenType companion tables; the CFF2 table alone does not contain the complete Unicode mapping, metrics, names, or embedding authorization
Explicit original-data contract
THPDFHeadlessFontTable carries a four-byte tag and its original bytes; THPDFHeadlessFontTables supplies these records to HPDFAssembleHeadlessCFF2Font
The required companion tables are OS/2, cmap, head, hhea, hmtx, maxp, name, and post; the caller must retain any original variation and layout tables needed by the selected coordinates and glyph positioning
Tags must be valid printable four-byte OpenType tags; duplicate tags and conflicting CFF2, CFF , glyf, or loca companion outlines are errors
The assembler rebuilds a checksum-correct OTTO container and omits an original DSIG signature that cannot authenticate the reconstructed container
HPDFBuildHeadlessRawCFF2Appearance assembles this complete original font, resolves the selected coordinates through the shared instance engine, and passes the instance to the normal variable appearance builder
PDF output and boundaries
PDF output embeds a converted static CFF 1 CID font rather than a bare CFF2 stream; the explicit encoding CMap, CIDs, widths, ToUnicode entries, glyph positions, and FontMatrix follow the same mapping contract as complete OpenType input
This API does not make a bare CFF2 font stream in an existing PDF default-appearance resource self-describing; automatic annotation fallback still requires a supported original resource format
Source, companion-table totals, working storage, final output size, metadata, horizontal advances, and cancellation are checked before publication; the downstream instance and appearance engines validate outlines and variation references
See headless variable-font instances and existing PDF raw-font fallback