|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gzz.util.ScalableFont
A font object from which it is easy to obtain instances and metrics scaled to requested multiplications. This exists because our target, the Java API 1.1.8 does not contain scaling functionality.
Scale is used in units of one thousand, i.e. 1000 = "normal" size.
Field Summary | |
static boolean |
dbg
|
static boolean |
dontCache
If set, font metrics will not be cached. |
static java.awt.Component |
fmComp
Used to get FontMetrics for a Font. |
static java.lang.String |
rcsid
|
Constructor Summary | |
ScalableFont(java.lang.String family,
int style,
int pointsize)
Constructor similar to Java's Font(f,s,p). |
Method Summary | |
java.awt.Font |
getFont(float scale)
Get a scaled instance of the font. |
java.awt.FontMetrics |
getFontMetrics(float scale)
Get font metrics for a scaled instance of the font. |
float |
getScale(float height)
Gets the scale for the point size which is nearest the given height. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String rcsid
public static boolean dbg
public static boolean dontCache
public static java.awt.Component fmComp
Constructor Detail |
public ScalableFont(java.lang.String family, int style, int pointsize)
pointsize
- Point size when scaling factor is 1.Method Detail |
public java.awt.Font getFont(float scale)
scale
- Scaling factor is (scale/1000).
public java.awt.FontMetrics getFontMetrics(float scale)
scale
- Scaling factor is (scale/1000).
public float getScale(float height)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |