interface IFontFaceDescriptor { font: FontFace; src: string; customData?: Map; } /** * Manages custom fonts loaded into the document and tracks the metadata needed to serialize them. */ export declare class FontRegistry { fonts: IFontFaceDescriptor[]; /** * Creates an empty font registry. */ constructor(); /** * Loads a font directly from a font file URL. * * @param name Font family name to register. * @param url URL of the font file. * @param descriptors Optional `FontFace` descriptors such as weight or style. * @param customData Optional metadata stored alongside the registered font. * @returns A promise that resolves after the font has been loaded and added to `document.fonts`. */ loadFromUrl(name: string, url: string, descriptors?: FontFaceDescriptors, customData?: Map): Promise; /** * Loads all `@font-face` rules found in a CSS file. * * @param name Font family name to register for the discovered faces. * @param cssUrl URL of the stylesheet containing `@font-face` declarations. * @param customData Optional metadata stored alongside each registered font. * @returns A promise that resolves after all matching font faces have been loaded. */ loadFromCssUrl(name: string, cssUrl: string, customData?: Map): Promise; /** * Preloads registered fonts for PIXI `HTMLText` rendering. * * @returns A promise that resolves after each registered font has been requested through `PIXI.HTMLText`. */ preloadHtmlTextFonts(): Promise; private load; /** * Removes a registered font family from the document and registry. * * @param fontFamily Font family name to remove. * @returns Nothing. */ offload(fontFamily: string): void; /** * Removes all registered fonts from the document and clears the registry. * * @returns Nothing. */ destroy(): void; /** * Serializes the registered fonts and their metadata. * * @returns The serialized font registry payload. */ serialize(): { fonts: { src: string; family: string; descriptors?: { weight?: string | undefined; style?: string | undefined; } | undefined; customData?: [string, unknown][] | undefined; }[]; }; /** * Restores a font registry from serialized data. * * @param data Serialized font registry payload to validate and load. * @returns A promise that resolves to the deserialized font registry. */ static deserialize(data: unknown): Promise; } export {};