import type { FontResult } from "./types.js"; /** * Font registry to track loaded fonts and prevent duplicates */ declare class FontRegistry { private fonts; private cssInjected; register(key: string, result: FontResult): void; get(key: string): FontResult | undefined; has(key: string): boolean; markCSSInjected(key: string): void; isCSSInjected(key: string): boolean; } export declare const fontRegistry: FontRegistry; /** * Create a font result object */ export declare function createFontResult(family: string, className: string, variable?: string, weight?: number, style?: string): FontResult; /** * Generate a cache key for a font configuration */ export declare function generateFontKey(family: string, options: Record): string; /** * Inject CSS into the document (client-side only) */ export declare function injectCSS(css: string, id: string): void; /** * Generate a unique ID for CSS injection */ export declare function generateCSSId(family: string): string; /** * Format font family name (e.g., "Roboto Mono" -> "Roboto_Mono" for function names) */ export declare function formatFontFunctionName(family: string): string; /** * Parse font family from function name (e.g., "Roboto_Mono" -> "Roboto Mono") */ export declare function parseFontFamily(functionName: string): string; /** * Validate font display value */ export declare function validateDisplay(display?: string): "auto" | "block" | "swap" | "fallback" | "optional"; /** * Validate and normalize weights */ export declare function normalizeWeights(weights?: number[] | "variable"): number[] | "variable"; /** * Normalize subsets */ export declare function normalizeSubsets(subsets?: string[]): string[]; /** * Check if we're running in a browser environment */ export declare function isBrowser(): boolean; /** * Check if we're running on the server */ export declare function isServer(): boolean; export {}; //# sourceMappingURL=font-loader.d.ts.map