public class FontUtil
extends java.lang.Object
Constructor and Description |
---|
FontUtil() |
Modifier and Type | Method and Description |
---|---|
static java.awt.Font |
getFont(java.lang.String fontFamilyName,
int style,
float size)
Returns a font with the given family name or, if not available, a similar font, e.g.
|
static java.lang.String[] |
getSimilarFontsList(java.lang.String fontFamily)
For a few basic font types, gets a list of replacement font families
Note that java's 'SansSerif' has wider characters (significantly different metrics) than the other
sans-serif fonts in the list; thus it should be considered a fallback option only.
|
public static java.awt.Font getFont(java.lang.String fontFamilyName, int style, float size)
public static java.lang.String[] getSimilarFontsList(java.lang.String fontFamily)