import type { HbFace, HbFont } from './harfbuzz.js'; import type { Style, FontStretch } from './cascade.js'; type FaceDescription = { family: string; families: string[]; weight: number; stretch: FontStretch; italic: boolean; oblique: boolean; }; type FaceNames = { family: string; subfamily: string; fullName: string; postscriptName: string; preferredFamily: string; preferredSubfamily: string; }; export declare class FaceMatch { face: HbFace; font: HbFont; filename: string; index: number; languages: Set; families: string[]; family: string; weight: number; stretch: FontStretch; italic: boolean; oblique: boolean; spaceFeatures: number; defaultSubSpaceFeatures: Uint32Array; nonDefaultSubSpaceFeatures: Uint32Array; constructor(face: HbFace, font: HbFont, filename: string, index: number); getExclusiveLanguage(): "ko" | "ja" | "zh-cn" | "zh-tw" | undefined; static isExclusiveLang(lang: string): boolean; getLanguages(): Set; getNames(): FaceNames; getFamiliesFromNames(names: FaceNames): string[]; createDescription(): FaceDescription; private getLookupsByLangScript; private hasLookupRuleWithGlyphByScript; private checkForFeaturesInvolvingSpace; private hasSubstitution; private hasSubstitutionRulesWithSpaceLookups; spaceMayParticipateInShaping(script: string): boolean; toFontString(size: number): string; toCssDescriptor(): { family: string; weight: string; style: string; stretch: FontStretch; }; } export declare function registerFont(url: URL, options?: { paint: boolean; }): Promise; export declare function registerFont(buffer: ArrayBuffer, url: URL, options?: { paint: boolean; }): Promise; export declare function unregisterFont(url: URL): void; declare class FontCascade { matches: FaceMatch[]; style: Style; constructor(list: FaceMatch[], style: Style); static fromSet(set: Map, style: Style): FontCascade; static stretchToLinear: Record; narrowByFontStretch(matches: FaceMatch[]): FaceMatch[]; narrowByFontStyle(matches: FaceMatch[]): FaceMatch[]; narrowByFontWeight(matches: FaceMatch[]): FaceMatch; sort(style: Style, lang: string): void; } export declare function getCascade(style: Style, lang: string): FontCascade; export declare function eachRegisteredFont(cb: (family: FaceMatch) => void): void; export declare function firstCascadeItem(): FaceMatch; export {};