loadFontImageMap
Loads a font image map from a given file or URL. This function creates a FontImageMap
instance from the specified font resource, applying the given properties such as size, character set, content scale, and a font scaling method.
Return
A FontImageMap
that represents the pre-rendered character textures for the specified font. Throws an exception if the file does not exist, is not a .ttf
or .otf
file, or if the URL is invalid.
Parameters
The path to a local font file or a URL pointing to a font resource.
The desired size of the font to be loaded.
A set of characters to include in the font image map. Defaults to defaultFontmapCharacterSet
. If a space character is not explicitly included, it will be added automatically.
A scaling factor for adjusting the pixel density of the font image map. Defaults to 1.0
.
A function defining how the font is scaled within the image map. Defaults to ::fontHeightScaler
.