| java.lang.Object java.awt.FontMetrics java.awt.MWFontMetrics
MWFontMetrics | class MWFontMetrics extends FontMetrics (Code) | | A font metrics object for a font.
version: 1.19, 08/19/02 |
Field Summary | |
int | ascent The standard ascent of the font. | int | descent The standard descent of the font. | int | height The standard height of a line of text in this font. | int | leading The standard leading for the font. | int | maxAdvance The maximum advance width of any character in this font. | int | maxAscent The maximum ascent for all characters in this font. | int | maxDescent The maximum descent for all characters in this font. | int | maxHeight The maximum possible height of a line of text in this font.
Adjacent lines of text spaced this distance apart will be
guaranteed not to overlap. | int | nativeFont | final static long | serialVersionUID |
ascent | int ascent(Code) | | The standard ascent of the font. This is the logical height
above the baseline for the Alphanumeric characters and should
be used for determining line spacing. Note, however, that some
characters in the font may extend above this height.
|
descent | int descent(Code) | | The standard descent of the font. This is the logical height
below the baseline for the Alphanumeric characters and should
be used for determining line spacing. Note, however, that some
characters in the font may extend below this height.
|
height | int height(Code) | | The standard height of a line of text in this font. This is
the distance between the baseline of adjacent lines of text.
It is the sum of the ascent+descent+leading. There is no
guarantee that lines of text spaced at this distance will be
disjoint; such lines may overlap if some characters overshoot
the standard ascent and descent metrics.
|
leading | int leading(Code) | | The standard leading for the font. This is the logical amount
of space to be reserved between the descent of one line of text
and the ascent of the next line. The height metric is calculated
to include this extra space.
|
maxAdvance | int maxAdvance(Code) | | The maximum advance width of any character in this font.
|
maxAscent | int maxAscent(Code) | | The maximum ascent for all characters in this font. No character
will extend further above the baseline than this metric.
|
maxDescent | int maxDescent(Code) | | The maximum descent for all characters in this font. No character
will descend further below the baseline than this metric.
|
maxHeight | int maxHeight(Code) | | The maximum possible height of a line of text in this font.
Adjacent lines of text spaced this distance apart will be
guaranteed not to overlap. Note, however, that many paragraphs
that contain ordinary alphanumeric text may look too widely
spaced if this metric is used to determine line spacing. The
height field should be preferred unless the text in a given
line contains particularly tall characters.
|
nativeFont | int nativeFont(Code) | | Native font handle
|
serialVersionUID | final static long serialVersionUID(Code) | | |
charWidth | public int charWidth(char c)(Code) | | Fast lookup of first 256 chars as these are always the same eg. ASCII charset.
|
charsWidth | public int charsWidth(char chars, int offset, int length)(Code) | | Return the width of the specified char[] in this Font.
|
getAscent | public int getAscent()(Code) | | Get ascent.
|
getDescent | public int getDescent()(Code) | | Get descent
|
getFontMetrics | static synchronized MWFontMetrics getFontMetrics(Font font)(Code) | | Gets the MWFontMetrics object for the supplied font. This method caches font metrics
to ensure native fonts are not loaded twice for the same font.
|
getHeight | public int getHeight()(Code) | | Get height
|
getLeading | public int getLeading()(Code) | | Get leading
|
getMaxAdvance | public int getMaxAdvance()(Code) | | Get maxAdvance
|
getMaxAscent | public int getMaxAscent()(Code) | | Get maxAscent
|
getMaxDescent | public int getMaxDescent()(Code) | | Get maxDescent
|
getWidths | public int[] getWidths()(Code) | | Get the widths of the first 256 characters in the font.
|
stringWidth | public int stringWidth(String string)(Code) | | Return the width of the specified string in this Font.
|
|
|