public final class GlyphFontRegistry extends Object
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.
Modifier and Type | Method and Description |
---|---|
static GlyphFont |
font(String familyName)
Retrieve font by its family name
|
static void |
register(GlyphFont font)
Registers the specified font
|
static void |
register(String familyName,
InputStream in,
int defaultSize)
Registers the specified font as default GlyphFont
|
static void |
register(String familyName,
String uri,
int defaultSize)
Registers the specified font as default GlyphFont
|
public static void register(String familyName, String uri, int defaultSize)
familyName
- The name of this font.uri
- The location where it can be loaded from.defaultSize
- The default font sizepublic static void register(String familyName, InputStream in, int defaultSize)
familyName
- The name of this font.in
- Inputstream of the font datadefaultSize
- The default font sizepublic static void register(GlyphFont font)
font
-