PrivateInitializes a new instance of the FontManager class.
PrivatecachedA cache of fonts keyed by font name and size.
PrivatefontA label node used for retrieving system fonts.
PrivatefontCallbacks for font load events.
Private OptionalwebReference to WebFontService.getFontStatus for web platform. This delegates to the authoritative source of font status.
Private Static Readonly_Default point size when getFontWithKey yields a font without an explicit positive size (matches MeasurementUtils.getSimpleTextSize fallback).
PrivatecachePrivategetRetrieves a font based on the provided name and size. If the font is not cached, it will be created and cached.
The name or path of the font.
Optionalsize: numberThe size of the font.
The font object if found or created, otherwise undefined.
Gets the load status of a font. On web platform, delegates to WebFontService which is the authoritative source. On other platforms (Roku), returns NotRegistered as fonts are handled differently.
The URL of the font.
The load status of the font.
Retrieves a font based on the provided key. The key can be a font name, a size, or both separated by a comma. If the size is missing, the font name must be one of the system fonts. If the font name is missing, it will use the system default font.
The key representing the font name and/or size.
The font object if found, otherwise undefined.
Resolves a font key to fontUri and fontSize for ISGNSimpleLabel.
Uses the same key rules as getFontWithKey. If the resolved font has no
positive size (e.g. system font with implicit size), size defaults to 36.
Font key (uri,size, system name, etc.).
[fontUri, fontSize], or undefined if the key does not resolve to a font with a usable URI.
PrivateinitializeInitializes font monitoring for web platform.
Subscribes to font load events.
Function called when a font load completes.
Removes a font load listener.
The callback function to remove.
Privateresolve
Manages font caching and retrieval for the application.
FontManager
Method
constructor Initializes a new instance of the FontManager class.
Method
getFontWithKey Retrieves a font based on the provided key. The key can be a font name, a size, or both separated by a comma. If the size is missing, the font name must be one of the system fonts. If the font name is missing, it will use the system default font.
Param: key
The key representing the font name and/or size.
Returns
Method
private getFont Retrieves a font based on the provided name and size. If the font is not cached, it will be created and cached.
Param: name
The name of the font.
Param: size
The size of the font.
Returns
Throws