import opentype from 'opentype.js'; import { GlyphCache } from './glyphEncoder'; /** * Returns true when `getFont(family, weight, italic)` fell back to Inter * because the requested font couldn't be loaded from fontsource. */ export declare function wasSubstituted(family: string, weight: number, italic: boolean): boolean; export declare function getFont(family: string, weight: number, italic: boolean): Promise<{ font: opentype.Font; cache: GlyphCache; } | null>; export declare function getFontSync(family: string, weight: number, italic: boolean): { font: opentype.Font; cache: GlyphCache; } | null; export declare function preloadFonts(descriptors: Array<{ family: string; weight: number; italic: boolean; }>): Promise; export declare function collectFontNeeds(root: Element): Array<{ family: string; weight: number; italic: boolean; }>;