Typing of PDF Font dicts + /Encoding resolution + the embedding adapter. Parsing of the font files themselves (TrueType, Type1, CFF, CIDFont) is delegated to @awacloud/fonts.

Module Returns Deps Description
pdfFont { typeFont, resolveDescendant } pdfErrors, pdfParser Font dict, §9.6 / §9.7.
pdfFontEncoding { resolveEncoding } pdfErrors /Encoding, §9.6.5.
pdfType3 { typeType3 } pdfErrors, pdfParser PDF-specific Type 3, §9.6.4.
pdfFontEmbed { embedSimple, embedCid } pdfErrors, embedSubsetForPdf, embedFontDescriptor, embedCidSystemInfo, embedToUnicodeBuilder Write-side adapter, §9.9 / ISO TS 32001.

Common pattern

const f = runtime.resolve('pdfFont');
const enc = runtime.resolve('pdfFontEncoding');
const font = f.typeFont(resources.Font.F1);
const table = enc.resolveEncoding(font.encoding, lookupNamed);

See also