fromFile
fun fromFile(file: String, size: Double, characterSet: Set<Char> = defaultFontmapCharacterSet, contentScale: Double = 1.0): FontImageMap(source)
Creates or retrieves a cached FontImageMap
instance from a file source. The FontImageMap
is generated or identified based on the provided parameters such as file path, font size, character set, and content scaling.
Return
A FontImageMap
representing the graphical mapping of characters based on the specified configurations.
Parameters
file
The path to the file containing the font resource.
size
The size of the font to be used for the image map.
characterSet
The set of characters to include in the image map. Defaults to defaultFontmapCharacterSet
.
contentScale
The scaling factor applied during rendering. Defaults to 1.0
.