import * as opentype from 'opentype.js'; /** * Load a font using opentype.js for accurate glyph measurement. */ export declare function loadFont(fontFamily: string, bold?: boolean, italic?: boolean, fontDirs?: string[], fontMap?: Record): opentype.Font; /** * Measure the width of a text string in points. */ export declare function measureText(text: string, fontFamily: string, fontSize: number, // in points bold?: boolean, italic?: boolean, fontDirs?: string[], fontMap?: Record): number; /** * Get font metrics (ascender, descender, line height) in points. */ export declare function getFontMetrics(fontFamily: string, fontSize: number, bold?: boolean, italic?: boolean, fontDirs?: string[], fontMap?: Record): { ascender: number; descender: number; lineHeight: number; }; /** Clear the font cache */ export declare function clearFontCache(): void; //# sourceMappingURL=text-measurer.d.ts.map