export declare class MeasureTextMetricsError extends Error { readonly name: string; } export declare class MeasureTextMetricsFontLoadingError extends MeasureTextMetricsError { readonly name: string; } export declare class MeasureTextMetricsCanvasError extends MeasureTextMetricsError { readonly name: string; } /** * Measure the text metrics of a given font. * The function also ensures that the font is loaded before measuring the text. * @param font the font string {@link https://developer.mozilla.org/en-US/docs/Web/CSS/font} */ export declare function measureTextMetrics(font: string, document: Document): Promise;