Package com.avrix.ui
Class NanoFont
java.lang.Object
com.avrix.ui.NanoFont
A set of tools for working with fonts in NanoVG
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
createFont
(String fontName, String jarFilePath, String internalFilePath) Creates and loads a font into NanoVG with the specified name from a font file inside a JAR.static void
createFont
(String fontName, Path fontPath) Creates and loads a font into NanoVG with the specified name from the given path.static void
Loading custom default fonts
-
Constructor Details
-
NanoFont
public NanoFont()
-
-
Method Details
-
loadDefaultFonts
public static void loadDefaultFonts()Loading custom default fonts -
createFont
public static void createFont(String fontName, String jarFilePath, String internalFilePath) throws IOException Creates and loads a font into NanoVG with the specified name from a font file inside a JAR.- Parameters:
fontName
- the name to assign to the font.jarFilePath
- the path to the JAR file containing the font.internalFilePath
- the path to the font file inside the JAR.- Throws:
IOException
- if an I/O error occurs while reading the font file.
-
createFont
Creates and loads a font into NanoVG with the specified name from the given path.- Parameters:
fontName
- the name to assign to the font.fontPath
- the path to the font file (e.g., a TrueType font file).
-