public abstract class GlyphFont extends Object
Glyphs can be created easily using specified character defined in the
font. For example, \uf013 in FontAwesome is used to represent
a gear icon.
To simplify glyph customization, methods can be chained, for example:
Glyph glyph = fontAwesome.fontSize(28).fontColor(Color.RED).create('\uf013'); //GEAR
Here's a screenshot of two font packs being used to render images into
JavaFX Button controls:

| Constructor and Description |
|---|
GlyphFont(String fontName,
int defaultSize,
InputStream in)
Loads glyph font from specified
InputStream |
GlyphFont(String fontName,
int defaultSize,
String urlStr)
Load glyph font from specified
URL |
| Modifier and Type | Method and Description |
|---|---|
Glyph |
create(char character)
Creates an instance of
Glyph using specified font character |
Glyph |
create(String glyphName)
Creates and instance of
Glyph using glyph name |
GlyphFont |
fontColor(Color color)
Sets font color
|
GlyphFont |
fontSize(double size)
Sets font size
|
double |
getDefaultSize()
Returns the default font size
|
abstract Map<String,Character> |
getGlyphs()
Returns glyph dictionary
|
String |
getName()
Returns font name
|
public GlyphFont(String fontName, int defaultSize, InputStream in)
InputStreamfontName - glyph font namedefaultSize - default font sizein - input stream to load the font frompublic String getName()
public double getDefaultSize()
public GlyphFont fontSize(double size)
size - public GlyphFont fontColor(Color color)
color - public Glyph create(char character)
Glyph using specified font charactercharacter - font characterGlyphpublic Glyph create(String glyphName)
Glyph using glyph nameglyphName - glyph name