/** * Fallback font override metrics for reducing Cumulative Layout Shift (CLS) * These values help create fallback fonts that closely match the dimensions * of the target Google Font, minimizing layout shift during font loading. * * Based on Next.js font optimization techniques: * https://developer.chrome.com/blog/font-fallbacks/ */ export interface FallbackFontMetrics { fallbackFont: string; ascentOverride: string; descentOverride: string; lineGapOverride: string; sizeAdjust: string; } /** * Get precalculated fallback font metrics for a Google Font family. * * Note: These metrics are calculated based on the font's characteristics * and help create fallback fonts that minimize layout shift. * * TODO: In the future, we could calculate these dynamically using fontkit * instead of relying on precalculated values. This would support all fonts * automatically as new fonts are added to Google Fonts. * * @param fontFamily - The Google Font family name * @returns Fallback font metrics or undefined if not available */ export declare function getFallbackFontOverrideMetrics(fontFamily: string): FallbackFontMetrics | undefined; /** * Generate CSS for fallback font with override metrics * This CSS should be injected alongside the main font declaration */ export declare function generateFallbackFontCSS(fontFamily: string, metrics: FallbackFontMetrics): string; //# sourceMappingURL=get-fallback-font-override-metrics.d.ts.map