Skip to content

modern-pdf-lib


modern-pdf-lib / SubsetResult

Interface: SubsetResult

Defined in: src/assets/font/fontSubset.ts:31

The result of subsetting a font.

Properties

fontData

readonly fontData: Uint8Array

Defined in: src/assets/font/fontSubset.ts:33

The subsetted font file bytes (TrueType).


newToOldGid

readonly newToOldGid: readonly number[]

Defined in: src/assets/font/fontSubset.ts:38

Mapping from new glyph ID (sequential, starting at 0) to original glyph ID. Index = new GID, value = old GID.


oldToNewGid

readonly oldToNewGid: ReadonlyMap<number, number>

Defined in: src/assets/font/fontSubset.ts:43

Mapping from original glyph ID to new glyph ID. Only contains entries for glyphs that were retained.

Released under the MIT License.