Skip to content

ParsedTtf

Defined in: src/core/font/ttf-parser.ts:41

A parsed TrueType / OpenType font (ISO/IEC 14496-22): metrics, the cmap-derived codepoint→glyph mapping, OpenType layout maps (ligatures, kerning, Arabic joining) and the raw bytes for embedding. Glyph outlines (glyf/CFF) are not decoded — the whole font is embedded in the PDF /FontFile2.

readonly advanceWidths: readonly number[]

Defined in: src/core/font/ttf-parser.ts:77


readonly ascender: number

Defined in: src/core/font/ttf-parser.ts:48


readonly capHeight: number

Defined in: src/core/font/ttf-parser.ts:55


readonly descender: number

Defined in: src/core/font/ttf-parser.ts:49


readonly flags: number

Defined in: src/core/font/ttf-parser.ts:73


readonly fontBBox: readonly [number, number, number, number]

Defined in: src/core/font/ttf-parser.ts:47


readonly glyphForCodepoint: (cp) => number

Defined in: src/core/font/ttf-parser.ts:78

number

number


readonly glyphOffsets: readonly number[]

Defined in: src/core/font/ttf-parser.ts:76


readonly indexToLocFormat: 0 | 1

Defined in: src/core/font/ttf-parser.ts:75


readonly italicAngle: number

Defined in: src/core/font/ttf-parser.ts:71


readonly joiningForms: ArabicJoiningForms

Defined in: src/core/font/ttf-parser.ts:87

Arabic cursive-joining substitutions (init/medi/fina). Empty for non-Arabic fonts, so the shaper leaves output unchanged.


readonly kerning: KerningMap

Defined in: src/core/font/ttf-parser.ts:82

OpenType pair kerning: "gid1,gid2" → advance adjustment in font units.


readonly ligatures: LigatureMap

Defined in: src/core/font/ttf-parser.ts:80

OpenType ligature substitutions: input GID sequence "gid1,gid2[,gid3…]" → output GID.


readonly lineGap: number

Defined in: src/core/font/ttf-parser.ts:54

hhea line gap (font units); with ascender/descender it forms the hhea vertical triple that drives the 'libreoffice' line-height profile (E-PARITY).


readonly numGlyphs: number

Defined in: src/core/font/ttf-parser.ts:74


readonly postScriptName: string

Defined in: src/core/font/ttf-parser.ts:45


readonly raw: Uint8Array

Defined in: src/core/font/ttf-parser.ts:42


readonly sfntVersion: number

Defined in: src/core/font/ttf-parser.ts:43


readonly stemV: number

Defined in: src/core/font/ttf-parser.ts:72


readonly tables: ReadonlyMap<string, TtfTableInfo>

Defined in: src/core/font/ttf-parser.ts:44


readonly unitsPerEm: number

Defined in: src/core/font/ttf-parser.ts:46


readonly vmetrics: object

Defined in: src/core/font/ttf-parser.ts:63

E-PARITY line-height metrics: OS/2 win/typo verticals (font units) selected by layout profile. 'word' uses winAscent/winDescent (the GDI cell box); 'libreoffice' uses the hhea triple above, or typo* when useTypoMetrics is set. All fall back to hhea when the font has no OS/2 table.

readonly typoAscent: number

readonly typoDescent: number

readonly typoLineGap: number

readonly useTypoMetrics: boolean

readonly winAscent: number

readonly winDescent: number


readonly xHeight: number

Defined in: src/core/font/ttf-parser.ts:56