/// <reference types="node" />
declare type FontOptions = {
    fontFamily: string;
    weights: string[];
    styles: string[];
    display: string;
    preload: boolean;
    selectedVariableAxes?: string[];
    fallback?: string[];
    adjustFontFallback: boolean;
    variable?: string;
    subsets: string[];
};
export declare function validateData(functionName: string, data: any, config: any): FontOptions;
/**
 * Generate the Google Fonts URL given the requested weight(s), style(s) and additional variable axes
 */
export declare function getUrl(fontFamily: string, axes: {
    wght?: string[];
    ital?: string[];
    variableAxes?: [string, string][];
}, display: string): string;
/**
 * Fetches the CSS containing the @font-face declarations from Google Fonts.
 * The fetch has a user agent header with a modern browser to ensure we'll get .woff2 files.
 *
 * The env variable NEXT_FONT_GOOGLE_MOCKED_RESPONSES may be set containing a path to mocked data.
 * It's used to defined mocked data to avoid hitting the Google Fonts API during tests.
 */
export declare function fetchCSSFromGoogleFonts(url: string, fontFamily: string): Promise<string>;
/**
 * Fetch the url and return a buffer with the font file.
 */
export declare function fetchFontFile(url: string): Promise<Buffer>;
/**
 * Validates and gets the data for each font axis required to generate the Google Fonts URL.
 */
export declare function getFontAxes(fontFamily: string, weights: string[], styles: string[], selectedVariableAxes?: string[]): {
    wght?: string[];
    ital?: string[];
    variableAxes?: [string, string][];
};
/**
 * Get precalculated fallback font metrics for the Google Fonts family.
 *
 * TODO:
 * We might want to calculate these values with fontkit instead (like in next/font/local).
 * That way we don't have to update the precalculated values every time a new font is added to Google Fonts.
 */
export declare function getFallbackFontOverrideMetrics(fontFamily: string): {
    fallbackFont: any;
    ascentOverride: string;
    descentOverride: string;
    lineGapOverride: string;
    sizeAdjust: string;
} | undefined;
/**
 * 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;
}[];
export {};
