import { ByteArray } from '../../types.js'; import { FontDescriptor, TtfFontInfo, FontParser } from '../types.js'; /** * Parses TrueType font files (.ttf) to extract metrics and glyph widths. */ export declare class TtfParser implements FontParser { private data; private tables; constructor(fontData: ByteArray); /** * Returns the original font bytes. */ getFontData(): ByteArray; private parseTables; private readTag; private getTable; /** * Parses the font and returns basic font information. */ getFontInfo(): TtfFontInfo; /** * Creates a FontDescriptor suitable for embedding. * Scales metrics to PDF's 1000-unit em square. */ getFontDescriptor(fontName?: string): FontDescriptor; /** * Gets character widths for a range of characters. * Widths are scaled to PDF's 1000-unit em square. */ getCharWidths(firstChar: number, lastChar: number): number[]; private parseHead; private parseHhea; private parseOS2; private parsePost; private parseName; parseCmap(): Map; private parseCmapFormat4; private parseCmapFormat12; parseHmtx(): Map; private parseMaxp; private estimateStemV; }