import { FontTables } from './font-tables.ts'; import { type TableRecord } from './table-records.ts'; export type FontType = 'TrueType' | 'CFF' | 'Type-1'; export declare class Font { private _glyphMapping; /** * The type of font based on the SFNT version signature. */ readonly type: FontType; /** * The table records in the font, sorted by their offset. */ readonly tableRecords: ReadonlyArray; /** * The font tables contained in the font. */ readonly tables: FontTables; /** * The typographic ascender value. * * Uses OS/2 sTypoAscender if USE_TYPO_METRICS is set, otherwise * usWinAscent, falls back to hhea ascender. */ readonly ascent: number; /** * The typographic descender value (typically negative). * * Uses OS/2 sTypoDescender if USE_TYPO_METRICS is set, otherwise * usWinDescent, falls back to hhea descender. */ readonly descent: number; /** * The typographic line gap value. * * Uses OS/2 sTypoLineGap if USE_TYPO_METRICS is set, otherwise zero. */ readonly lineGap: number; static fromData(fontData: Uint8Array): Font; private constructor(); /** * The full font name as stored in the name table. * Returns `undefined` if the name table or the full font name entry is missing. */ get fontName(): string | undefined; /** * The number of glyphs in the font. */ get numGlyphs(): number; /** * The number of font units per em square. */ get unitsPerEm(): number; /** * The mapping from Unicode code points to glyph IDs. */ get glyphMapping(): ReadonlyMap; private getCmapSubtable; }