UNPKG

@next/font

Version:

`@next/font` includes built-in automatic self-hosting for any font file. This means you can optimally load web fonts with zero layout shift, thanks to the underlying CSS size-adjust property used.

10 lines (9 loc) 413 B
/** * Find all font files in the CSS response and determine which files should be preloaded. * In Google Fonts responses, the @font-face's subset is above it in a comment. * Walk through the CSS from top to bottom, keeping track of the current subset. */ export declare function findFontFilesInCss(css: string, subsetsToPreload?: string[]): { googleFontFileUrl: string; preloadFontFile: boolean; }[];