/** * Calculates the font size that fits the given text (and optional suffix) * into the container. * * Space needed scales linearly with font size, so we measure once at * `FONT_BASE` and interpolate. The smaller of (horizontal-fit, vertical-fit) * fits both axes; in much wider than tall containers the result may exceed * the vertical fit by up to 10%. * * Re-measures when webfonts finish loading: `canvas.measureText` falls back * to the system font until the requested family is in the FontFace cache. * * @param container - container element for the text * @param text - string to measure the font size * @param element - element containing text font style * @param suffix - string to measure the suffix font size * @param suffixElement - element containing suffix font style * @returns perfect font size */ export declare function useFontSizeForContainer({ container, text, element, suffix, suffixElement, }: { container: { width: number; height: number; }; text: string; element?: HTMLElement | null; suffix?: string; suffixElement?: HTMLElement | null; }): number; //# sourceMappingURL=useFontSizeForContainer.d.ts.map