Modifier and Type | Field and Description |
---|---|
protected HashMap<String,FontSlot> |
cache
Cached fonts.
|
protected Font |
defaultFont
The default font.
|
static FontCache |
defaultFontCache
The default font cache.
|
Constructor and Description |
---|
FontCache()
New empty font cache.
|
Modifier and Type | Method and Description |
---|---|
static FontCache |
defaultFontCache()
Default singleton instance for shared font cache.
|
Font |
getDefaultFont()
The default font.
|
Font |
getDefaultFont(StyleConstants.TextStyle style,
int size) |
Font |
getFont(String name,
StyleConstants.TextStyle style,
int size)
Lookup a font, and if not found, try to load it, if still not available,
return the default font.
|
protected Font defaultFont
public static FontCache defaultFontCache
public FontCache()
public Font getDefaultFont()
public static FontCache defaultFontCache()
public Font getDefaultFont(StyleConstants.TextStyle style, int size)
public Font getFont(String name, StyleConstants.TextStyle style, int size)
name
- The font name.style
- A style, taken from the styles available in the style sheets.size
- The font size in points.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses