Package com.avrix.ui

Class NanoFont

java.lang.Object
com.avrix.ui.NanoFont

public class NanoFont extends Object
A set of tools for working with fonts in NanoVG
  • 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

      public static void createFont(String fontName, Path fontPath)
      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).