/** * Font Manager * ------------ * Provides programmatic font registration and integrates with typography * design tokens to keep the document font-face list in sync. */ export type FontDisplayStrategy = 'auto' | 'block' | 'swap' | 'fallback' | 'optional'; export interface FontVariantDescriptor { src: string; weight?: string | number; style?: 'normal' | 'italic' | 'oblique'; display?: FontDisplayStrategy; unicodeRange?: string; stretch?: string; variationAxes?: Record; } export interface FontFamilyConfig { family: string; fallbacks?: string[]; variants: FontVariantDescriptor[]; } export declare class FontManager { private documentRef; constructor(documentRef?: Document | undefined); /** * Registers a font family configuration. If executed in the browser, this * method loads all declared variants and adds them to `document.fonts`. */ register(config: FontFamilyConfig): Promise; /** * Reveals all registered families (including those sourced from tokens). */ listFamilies(): FontFamilyConfig[]; /** * Loads a single font variant. Calls are deduplicated via an internal cache. */ loadVariant(family: string, variant: FontVariantDescriptor): Promise; /** * Derives a CSS `font-family` declaration combining the primary family and * any declared fallbacks. */ static toFontStack(config: FontFamilyConfig): string; private createFontFace; private attachTokenListener; } export declare function detachFontTokenListener(): void; //# sourceMappingURL=font-manager.d.ts.map