public class FontLib
extends java.lang.Object
| Constructor and Description |
|---|
FontLib() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearCache()
Clear the Font object cache.
|
static int |
getCacheLookupCount()
Get the number of cache lookups to the Font object cache.
|
static int |
getCacheMissCount()
Get the number of cache misses to the Font object cache.
|
static java.awt.Font |
getFont(java.lang.String name,
double size)
Get a Font instance with the given font family name and size.
|
static java.awt.Font |
getFont(java.lang.String name,
int style,
double size)
Get a Font instance with the given font family name, style, and size
|
static java.awt.Font |
getFont(java.lang.String name,
int style,
int size)
Get a Font instance with the given font family name, style, and size
|
static java.awt.Font |
getIntermediateFont(java.awt.Font f1,
java.awt.Font f2,
double frac)
Interpolate between two font instances.
|
public static java.awt.Font getFont(java.lang.String name,
double size)
name - the font name. Any font installed on your system should
be valid. Common examples include "Arial", "Verdana", "Tahoma",
"Times New Roman", "Georgia", and "Courier New".size - the size, in points, of the fontpublic static java.awt.Font getFont(java.lang.String name,
int style,
double size)
name - the font name. Any font installed on your system should
be valid. Common examples include "Arial", "Verdana", "Tahoma",
"Times New Roman", "Georgia", and "Courier New".style - the font style, such as bold or italics. This field
uses the same style values as the Java Font class.size - the size, in points, of the fontpublic static java.awt.Font getFont(java.lang.String name,
int style,
int size)
name - the font name. Any font installed on your system should
be valid. Common examples include "Arial", "Verdana", "Tahoma",
"Times New Roman", "Georgia", and "Courier New".style - the font style, such as bold or italics. This field
uses the same style values as the Java Font class.size - the size, in points, of the fontpublic static int getCacheMissCount()
public static int getCacheLookupCount()
public static void clearCache()
public static java.awt.Font getIntermediateFont(java.awt.Font f1,
java.awt.Font f2,
double frac)
f1 - the starting fontf2 - the target fontfrac - a fraction between 0 and 1.0 controlling the interpolation
amount.