java.lang.Object
java.awt.FontMetrics
gnu.java.awt.peer.gtk.GdkFontMetrics
- All Implemented Interfaces:
- java.io.Serializable
- public class GdkFontMetrics
- extends java.awt.FontMetrics
|
Method Summary |
int |
charsWidth(char[] data,
int off,
int len)
Returns the total width of the specified character array. |
int |
charWidth(char ch)
Returns the width of the specified character. |
int |
getAscent()
Returns the ascent of the font, which is the distance from the base
to the top of the majority of characters in the set. |
int |
getDescent()
Returns the descent of the font, which is the distance from the base
to the bottom of the majority of characters in the set. |
int |
getLeading()
Returns the leading, or spacing between lines, for this font. |
int |
getMaxAdvance()
Returns the width of the widest character in the font. |
int |
getMaxAscent()
Returns the maximum ascent value. |
int |
getMaxDescent()
Returns the maximum descent value. |
private static java.awt.Font |
initFont(java.awt.Font font)
Makes sure to return a Font based on the given Font that has as
peer a GdkFontPeer. |
int |
stringWidth(java.lang.String str)
Returns the total width of the specified string |
| Methods inherited from class java.awt.FontMetrics |
bytesWidth, charWidth, getFont, getHeight, getLineMetrics, getLineMetrics, getLineMetrics, getLineMetrics, getMaxCharBounds, getMaxDecent, getStringBounds, getStringBounds, getStringBounds, getStringBounds, getWidths, hasUniformLineMetrics, toString |
font_metrics
private int[] font_metrics
peer
GdkFontPeer peer
FONT_METRICS_ASCENT
static final int FONT_METRICS_ASCENT
- See Also:
- Constant Field Values
FONT_METRICS_MAX_ASCENT
static final int FONT_METRICS_MAX_ASCENT
- See Also:
- Constant Field Values
FONT_METRICS_DESCENT
static final int FONT_METRICS_DESCENT
- See Also:
- Constant Field Values
FONT_METRICS_MAX_DESCENT
static final int FONT_METRICS_MAX_DESCENT
- See Also:
- Constant Field Values
FONT_METRICS_MAX_ADVANCE
static final int FONT_METRICS_MAX_ADVANCE
- See Also:
- Constant Field Values
TEXT_METRICS_X_BEARING
static final int TEXT_METRICS_X_BEARING
- See Also:
- Constant Field Values
TEXT_METRICS_Y_BEARING
static final int TEXT_METRICS_Y_BEARING
- See Also:
- Constant Field Values
TEXT_METRICS_WIDTH
static final int TEXT_METRICS_WIDTH
- See Also:
- Constant Field Values
TEXT_METRICS_HEIGHT
static final int TEXT_METRICS_HEIGHT
- See Also:
- Constant Field Values
TEXT_METRICS_X_ADVANCE
static final int TEXT_METRICS_X_ADVANCE
- See Also:
- Constant Field Values
TEXT_METRICS_Y_ADVANCE
static final int TEXT_METRICS_Y_ADVANCE
- See Also:
- Constant Field Values
GdkFontMetrics
public GdkFontMetrics(java.awt.Font font)
initFont
private static java.awt.Font initFont(java.awt.Font font)
- Makes sure to return a Font based on the given Font that has as
peer a GdkFontPeer. Used in the initializer.
stringWidth
public int stringWidth(java.lang.String str)
- Description copied from class:
java.awt.FontMetrics
- Returns the total width of the specified string
charWidth
public int charWidth(char ch)
- Description copied from class:
java.awt.FontMetrics
- Returns the width of the specified character.
charsWidth
public int charsWidth(char[] data,
int off,
int len)
- Description copied from class:
java.awt.FontMetrics
- Returns the total width of the specified character array.
getLeading
public int getLeading()
- Description copied from class:
java.awt.FontMetrics
- Returns the leading, or spacing between lines, for this font.
getAscent
public int getAscent()
- Description copied from class:
java.awt.FontMetrics
- Returns the ascent of the font, which is the distance from the base
to the top of the majority of characters in the set. Some characters
can exceed this value however.
getMaxAscent
public int getMaxAscent()
- Description copied from class:
java.awt.FontMetrics
- Returns the maximum ascent value. This is the maximum distance any
character in the font rised above the baseline.
getDescent
public int getDescent()
- Description copied from class:
java.awt.FontMetrics
- Returns the descent of the font, which is the distance from the base
to the bottom of the majority of characters in the set. Some characters
can exceed this value however.
getMaxDescent
public int getMaxDescent()
- Description copied from class:
java.awt.FontMetrics
- Returns the maximum descent value. This is the maximum distance any
character in the font extends below the baseline.
getMaxAdvance
public int getMaxAdvance()
- Description copied from class:
java.awt.FontMetrics
- Returns the width of the widest character in the font.