An instance of a text font.
Heaps comes with a default Font that covers basic ASCII characters, and can be retrieved via
The baseline value of the font represents the base on which characters will sit.
Used primarily with
HtmlText to sit multiple fonts and images at the same line.
Font charset allows to resolve specific char codes that are not directly present in glyph map as well as detect spaces.
Font line height provides vertical offset for each new line of the text.
The font name. Assigned on font creation and can be used to identify font instances.
Current font size. Font can be resized with
The resource path of the source Tile. Either relative to .fnt or to resources root.
FontChar instance corresponding to the
If font char is not present in glyph list,
charset.resolveChar is called.
null if glyph under specified charcode does not exist.
The charcode to search for.
Checks if character is present in glyph list.
getChar does not check if it exists through
The charcode to look up.
Resizes the Font instance to specified size.
For BitmapFonts it can be used to create smoother fonts by rasterizing them with double size while still keeping the original glyph size by downscaling the font. And SDF fonts can be resized to arbitrary sizes to produce scalable fonts of any size.
The new font size.