Class GlyphFontRegistry


  • public final class GlyphFontRegistry
    extends Object
    The glyph font registry automatically registers available fonts using a ServiceLoader facility, however it is also possible to register glyph fonts manually using the provided register(GlyphFont) method.

    Once registered, fonts can be requested by name using the font(String) method. Please refer to the GlyphFont documentation to learn how to use a font.

    • Method Detail

      • register

        public static void register​(String familyName,
                                    String uri,
                                    int defaultSize)
        Registers the specified font as default GlyphFont
        Parameters:
        familyName - The name of this font.
        uri - The location where it can be loaded from.
        defaultSize - The default font size
      • register

        public static void register​(String familyName,
                                    InputStream in,
                                    int defaultSize)
        Registers the specified font as default GlyphFont
        Parameters:
        familyName - The name of this font.
        in - Inputstream of the font data
        defaultSize - The default font size
      • register

        public static void register​(GlyphFont font)
        Registers the specified font
        Parameters:
        font -
      • font

        public static GlyphFont font​(String familyName)
        Retrieve font by its family name
        Parameters:
        familyName - family name of the font
        Returns:
        font or null if not found