import type { TextOptions, TextHandle, FontMetrics, LoadedFont, HarfBuzzInstance } from './types'; import type { HyphenationTrieNode } from '../hyphenation'; declare global { interface Window { hbjs?: any; createHarfBuzz?: () => Promise; } } export declare class Text { private static patternCache; private static hbInitPromise; private static fontCache; private static fontCacheMemoryBytes; private static maxFontCacheMemoryBytes; private static fontIdCounter; static enableWoff2(decoder: (data: ArrayBuffer | Uint8Array) => Uint8Array | Promise): void; private static stableStringify; private fontLoader; private loadedFont?; private currentFontId; private geometryBuilder?; private textShaper?; private textLayout?; private constructor(); static setHarfBuzzPath(path: string): void; static setHarfBuzzBuffer(wasmBuffer: ArrayBuffer): void; static init(): Promise; static create(options: TextOptions): Promise; private static resolveFont; private static loadAndCacheFont; private static trackFontCacheAdd; private static trackFontCacheRemove; private static enforceFontCacheMemoryLimit; private static generateFontContentHash; private setLoadedFont; private loadFont; private createGeometry; private prepareHyphenation; private validateOptions; private updateFontVariations; private prepareLayout; private applyColorSystem; private calculateGlyphBounds; private finalizeGeometry; getFontMetrics(): FontMetrics; static preloadPatterns(languages: string[], patternsPath?: string): Promise; static registerPattern(language: string, pattern: HyphenationTrieNode): void; static setMaxFontCacheMemoryMB(limitMB: number): void; getLoadedFont(): LoadedFont | undefined; measureTextWidth(text: string, letterSpacing?: number): number; getCacheSize(): number; clearCache(): void; private createGlyphAttributes; private resetHelpers; destroy(): void; }