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.
Properties
Section titled “Properties”advanceWidths
Section titled “advanceWidths”
readonlyadvanceWidths: readonlynumber[]
Defined in: src/core/font/ttf-parser.ts:77
ascender
Section titled “ascender”
readonlyascender:number
Defined in: src/core/font/ttf-parser.ts:48
capHeight
Section titled “capHeight”
readonlycapHeight:number
Defined in: src/core/font/ttf-parser.ts:55
descender
Section titled “descender”
readonlydescender:number
Defined in: src/core/font/ttf-parser.ts:49
readonlyflags:number
Defined in: src/core/font/ttf-parser.ts:73
fontBBox
Section titled “fontBBox”
readonlyfontBBox: readonly [number,number,number,number]
Defined in: src/core/font/ttf-parser.ts:47
glyphForCodepoint
Section titled “glyphForCodepoint”
readonlyglyphForCodepoint: (cp) =>number
Defined in: src/core/font/ttf-parser.ts:78
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”number
glyphOffsets
Section titled “glyphOffsets”
readonlyglyphOffsets: readonlynumber[]
Defined in: src/core/font/ttf-parser.ts:76
indexToLocFormat
Section titled “indexToLocFormat”
readonlyindexToLocFormat:0|1
Defined in: src/core/font/ttf-parser.ts:75
italicAngle
Section titled “italicAngle”
readonlyitalicAngle:number
Defined in: src/core/font/ttf-parser.ts:71
joiningForms
Section titled “joiningForms”
readonlyjoiningForms: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.
kerning
Section titled “kerning”
readonlykerning:KerningMap
Defined in: src/core/font/ttf-parser.ts:82
OpenType pair kerning: "gid1,gid2" → advance adjustment in font units.
ligatures
Section titled “ligatures”
readonlyligatures:LigatureMap
Defined in: src/core/font/ttf-parser.ts:80
OpenType ligature substitutions: input GID sequence "gid1,gid2[,gid3…]" → output GID.
lineGap
Section titled “lineGap”
readonlylineGap: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).
numGlyphs
Section titled “numGlyphs”
readonlynumGlyphs:number
Defined in: src/core/font/ttf-parser.ts:74
postScriptName
Section titled “postScriptName”
readonlypostScriptName:string
Defined in: src/core/font/ttf-parser.ts:45
readonlyraw:Uint8Array
Defined in: src/core/font/ttf-parser.ts:42
sfntVersion
Section titled “sfntVersion”
readonlysfntVersion:number
Defined in: src/core/font/ttf-parser.ts:43
readonlystemV:number
Defined in: src/core/font/ttf-parser.ts:72
tables
Section titled “tables”
readonlytables:ReadonlyMap<string,TtfTableInfo>
Defined in: src/core/font/ttf-parser.ts:44
unitsPerEm
Section titled “unitsPerEm”
readonlyunitsPerEm:number
Defined in: src/core/font/ttf-parser.ts:46
vmetrics
Section titled “vmetrics”
readonlyvmetrics: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.
typoAscent
Section titled “typoAscent”
readonlytypoAscent:number
typoDescent
Section titled “typoDescent”
readonlytypoDescent:number
typoLineGap
Section titled “typoLineGap”
readonlytypoLineGap:number
useTypoMetrics
Section titled “useTypoMetrics”
readonlyuseTypoMetrics:boolean
winAscent
Section titled “winAscent”
readonlywinAscent:number
winDescent
Section titled “winDescent”
readonlywinDescent:number
xHeight
Section titled “xHeight”
readonlyxHeight:number
Defined in: src/core/font/ttf-parser.ts:56