| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is a FontMetrics to be used for AWT rendering. It instanciates a font, depening on famil and style values. The java.awt.FontMetrics for this font is then created to be used for the actual measurement. Since layout is word by word and since it is expected that two subsequent words often share the same style, the Font and FontMetrics is buffered and only changed if needed.
Since FontState and FontInfo multiply all factors by size, we assume a "standard" font of FONT_SIZE.
Field Summary | |
final static int | FONT_FACTOR This factor multiplies the calculated values to scale to FOP internal measurements |
final static int | FONT_SIZE Font size standard used for metric measurements |
(package private) Component | parent Component parent is needed to have an AWT reference from which to get the font metrics |
Constructor Summary | |
AWTFontMetrics(Component parent) Constructs a new Font-metrics. |
Method Summary | |
int | getAscender(String family, int style, int size) Determines the font ascent of the Font described by this FontMetrics object |
int | getCapHeight(String family, int style, int size) The size of a capital letter measured from the font's baseline |
int | getDescender(String family, int style, int size) Determines the font descent of the Font described by this FontMetrics object |
java.awt.Font | getFont(String family, int style, int size) Returns a java.awt.Font instance for the desired family, style and size type. |
int[] | getWidths(String family, int style, int size) Return widths (in 1/1000ths of point size) of all characters |
int | getXHeight(String family, int style, int size) Determines the typical font height of a small cap letter FontMetrics object |
int | width(int i, String family, int style, int size) Returns width (in 1/1000ths of point size) of character at code point i |
Field Detail |
public final static int FONT_FACTOR
public final static int FONT_SIZE
Component parent
Constructor Detail |
public AWTFontMetrics(Component parent)
Method Detail |
public int getAscender(String family, int style, int size)
public int getCapHeight(String family, int style, int size)
public int getDescender(String family, int style, int size)
public java.awt.Font getFont(String family, int style, int size)
public int[] getWidths(String family, int style, int size)
public int getXHeight(String family, int style, int size)
public int width(int i, String family, int style, int size)
Association Links |
to Class java.lang.String
to Class java.awt.FontMetrics
to Class java.awt.Component
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |