Creates an empty font registry.
Removes all registered fonts from the document and clears the registry.
Nothing.
Loads fonts restored from serialized data. The engine calls this during initialization.
Fonts that are already registered (e.g. loaded by the host) are skipped, so calling this after deserialization never double-loads a font.
A promise that resolves after all pending fonts have been attempted.
Checks whether a font is already registered.
Font family name to look up.
Optionalweight: stringOptional font weight; when omitted any weight matches.
Optionalstyle: stringOptional font style; when omitted any style matches.
true if a matching font is registered; otherwise false.
Loads all @font-face rules found in a CSS file.
Font family name to register for the discovered faces.
URL of the stylesheet containing @font-face declarations.
OptionalcustomData: Map<string, unknown>Optional metadata stored alongside each registered font.
A promise that resolves after all matching font faces have been loaded.
Loads a font directly from a font file URL.
Font family name to register.
URL of the font file.
Optionaldescriptors: FontFaceDescriptorsOptional FontFace descriptors such as weight or style.
OptionalcustomData: Map<string, unknown>Optional metadata stored alongside the registered font.
A promise that resolves after the font has been loaded and added to document.fonts.
Removes a registered font family from the document and registry.
Font family name to remove.
Nothing.
Preloads registered fonts for PIXI HTMLText rendering.
A promise that resolves after each registered font has been requested through PIXI.HTMLText.
Serializes the registered fonts and their metadata.
The serialized font registry payload.
Stores serialized font data to be loaded on the next init() call.
Optionaldata: unknownSerialized font registry payload to validate, or undefined to clear pending fonts.
Nothing.
StaticdeserializeRestores a font registry from serialized data.
Serialized font registry payload to validate and load.
A promise that resolves to the deserialized font registry.
Manages custom fonts loaded into the document and tracks the metadata needed to serialize them.