public class FontUtil extends Object
| Constructor | Description |
|---|---|
FontUtil() |
| Modifier and Type | Method | Description |
|---|---|---|
static Font |
getFont(String fontFamilyName,
int style,
float size) |
Returns a font with the given family name or, if not available, a similar font, e.g.
|
static String[] |
getSimilarFontsList(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 Font getFont(String fontFamilyName, int style, float size)
public static String[] getSimilarFontsList(String fontFamily)