Loading a Font
Fonts, when working with VTerminal, consist of a PNG and FNT file. The PNG is a large sprite sheet containing every character of the font and the FNT file describes the position of each character in the PNG. When loading a font, VTerminal requires both files along with a scale value that can be used to resize the font as it is loaded.
Each of the following functions, of the FontLoader class, can be used to load a font.
Links
- JavaDoc documentation for the FontLoader class.
- A guide on how to create a Screen.
loadFont(String, double)
This function automatically searches for a PNG and FNT file in the given folder on the local filesystem, then loads the font using the found files.
loadFont(String, String, double)
This function loads a font from the local filesystem using the given PNG and FNT files.
loadFontFromJar(String, double)
This function automatically searches for a PNG and FNT file in the given folder within the Jar file, then loads the font using the found files.
loadFontFromJar(String, String, double)
This function loads a font from within the Jar file using the given PNG and FNT files.