UNPKG

unplugin-fonts

Version:
20 lines (19 loc) 850 B
import type { Options } from '../types'; export declare function hasFallbacks(options: Options): boolean; /** * Generate fallback CSS for all font families that have opted in. */ export declare function generateAllFallbacks(options: Options, root: string): Promise<string>; /** * Build a map of font family name → fallback name for all fonts * that have fallback configured. Used by the transform hook. */ export declare function collectFallbackNames(options: Options): Map<string, string>; /** * Transform CSS to append fallback font names to font-family declarations. * Only modifies declarations that reference a font with fallback configured. */ export declare function transformFontFamilyDeclarations(code: string, id: string, fallbackNames: Map<string, string>, sourcemap?: boolean): { code: string; map?: any; } | undefined;