import type { CanvasTextFontFamily, CanvasTextFontStyle } from '../../consts.js';
import { type CanvasTextFontWeight } from '../../consts.js';
import type { Bound } from '../../utils/bound.js';
import type { TextElement } from './text-element.js';
import type { ITextDelta } from './types.js';
export declare const isRTL: (text: string) => boolean;
export declare const isChrome: boolean;
export declare const isSafari: boolean;
export declare function wrapFontFamily(fontFamily: CanvasTextFontFamily): string;
export declare function getLineHeight(fontFamily: CanvasTextFontFamily, fontSize: number): number;
export declare function getFontString({ fontStyle, fontWeight, fontSize, fontFamily, }: {
    fontStyle: string;
    fontWeight: string;
    fontSize: number;
    fontFamily: CanvasTextFontFamily;
}): string;
export declare function normalizeText(text: string): string;
export declare function splitIntoLines(text: string): string[];
export declare function getLineWidth(text: string, font: string): number;
export declare function getTextRect(text: string, fontFamily: string, fontSize: number): {
    w: number;
    h: number;
};
export declare function getTextWidth(text: string, font: string): number;
export declare function parseTokens(text: string): string[];
export declare const charWidth: {
    calculate: (char: string, font: string) => number;
    getCache: (font: string) => number[];
};
export declare const truncateTextByWidth: (text: string, font: string, width: number) => string;
export declare function wrapText(text: string, font: string, maxWidth: number): string;
/**
 * convert a delta insert array to chunks, each chunk is a line
 */
export declare function deltaInsertsToChunks(delta: ITextDelta[]): ITextDelta[][];
export declare function normalizeTextBound(text: TextElement, bound: Bound, dragging?: boolean): Bound;
export declare function getFontFacesByFontFamily(fontFamily: CanvasTextFontFamily): FontFace[];
export declare function isFontWeightSupported(fontFamily: CanvasTextFontFamily, weight: CanvasTextFontWeight): boolean;
export declare function isFontStyleSupported(fontFamily: CanvasTextFontFamily, style: CanvasTextFontStyle): boolean;
//# sourceMappingURL=utils.d.ts.map