public final class FontInfo
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static FontInfo |
get(java.awt.Font font) |
static FontInfo |
get(java.lang.String name) |
static java.util.List<FontInfo> |
getAll(boolean withAllStyles) |
java.awt.Font |
getFont() |
java.awt.Font |
getFont(int size) |
boolean |
isMonospaced() |
static boolean |
isMonospaced(java.awt.Font font) |
java.lang.String |
toString() |
public boolean isMonospaced()
true
if font is monospaced, false
otherwisepublic java.awt.Font getFont()
public java.awt.Font getFont(int size)
size
- required font sizepublic java.lang.String toString()
toString
in class java.lang.Object
public static FontInfo get(java.lang.String name)
name
- the font name to validatenull
a font cannot render english lettersGraphicsEnvironment.isHeadless()
public static FontInfo get(java.awt.Font font)
font
- the font to validatenull
a font cannot render english lettersGraphicsEnvironment.isHeadless()
public static java.util.List<FontInfo> getAll(boolean withAllStyles)
withAllStyles
- true
- all fonts, false
- all plain fontsGraphicsEnvironment.isHeadless()
public static boolean isMonospaced(java.awt.Font font)