| java.lang.Object java.awt.FontMetrics sun.awt.motif.X11FontMetrics
X11FontMetrics | public class X11FontMetrics extends FontMetrics (Code) | | A font metrics object for a WServer font.
version: 1.34, 05/05/07 author: Jim Graham |
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. | static Hashtable | table | int | widths The widths of the first 256 characters. |
Constructor Summary | |
public | X11FontMetrics(Font font) Calculate the metrics from the given WServer and font. |
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.
|
widths | int widths(Code) | | The widths of the first 256 characters.
|
X11FontMetrics | public X11FontMetrics(Font font)(Code) | | Calculate the metrics from the given WServer and font.
|
bytesWidth | native public int bytesWidth(byte data, int off, int len)(Code) | | Return the width of the specified byte[] in this Font.
|
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
|
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.
|
Methods inherited from java.awt.FontMetrics | public int bytesWidth(byte data, int off, int len)(Code)(Java Doc) public int charWidth(int codePoint)(Code)(Java Doc) public int charWidth(char ch)(Code)(Java Doc) public int charsWidth(char data, int off, int len)(Code)(Java Doc) public int getAscent()(Code)(Java Doc) public int getDescent()(Code)(Java Doc) public Font getFont()(Code)(Java Doc) public FontRenderContext getFontRenderContext()(Code)(Java Doc) public int getHeight()(Code)(Java Doc) public int getLeading()(Code)(Java Doc) public LineMetrics getLineMetrics(String str, Graphics context)(Code)(Java Doc) public LineMetrics getLineMetrics(String str, int beginIndex, int limit, Graphics context)(Code)(Java Doc) public LineMetrics getLineMetrics(char[] chars, int beginIndex, int limit, Graphics context)(Code)(Java Doc) public LineMetrics getLineMetrics(CharacterIterator ci, int beginIndex, int limit, Graphics context)(Code)(Java Doc) public int getMaxAdvance()(Code)(Java Doc) public int getMaxAscent()(Code)(Java Doc) public Rectangle2D getMaxCharBounds(Graphics context)(Code)(Java Doc) public int getMaxDecent()(Code)(Java Doc) public int getMaxDescent()(Code)(Java Doc) public Rectangle2D getStringBounds(String str, Graphics context)(Code)(Java Doc) public Rectangle2D getStringBounds(String str, int beginIndex, int limit, Graphics context)(Code)(Java Doc) public Rectangle2D getStringBounds(char[] chars, int beginIndex, int limit, Graphics context)(Code)(Java Doc) public Rectangle2D getStringBounds(CharacterIterator ci, int beginIndex, int limit, Graphics context)(Code)(Java Doc) public int[] getWidths()(Code)(Java Doc) public boolean hasUniformLineMetrics()(Code)(Java Doc) public int stringWidth(String str)(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
|
|