FontMetrics are obtained from GCs
using the getFontMetrics() method.
GC#getFontMetrics, Sample code and further information
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv int | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the object is the same as this object and false otherwisethe object to compare with this object object)Overrides java. |
| public int | |
| public double | Returns: the average character width of the fontReturns the average character width, measured in points, of the font described by the receiver. |
| public int | Returns: the average character width of the font
Deprecated
Use getAverageCharacterWidth() instead
Returns the average character width, measured in points,
of the font described by the receiver.
|
| public int | Returns: the descent of the fontReturns the descent of the font described by the receiver. |
| public int | Returns: the height of the fontReturns the height of the font described by the receiver, measured in points. |
| public int | Returns: the leading space of the fontReturns the leading area of the font described by the receiver. |
| public int | Returns: the receiver's hashOverrides java. |
| ascentInPoints | back to summary |
|---|---|
| pack-priv int ascentInPoints | |
| averageCharWidthInPoints | back to summary |
|---|---|
| pack-priv int averageCharWidthInPoints | |
| descentInPoints | back to summary |
|---|---|
| pack-priv int descentInPoints | |
| FontMetrics | back to summary |
|---|---|
| pack-priv FontMetrics() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides java. Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. | |
| getAscent | back to summary |
|---|---|
| public int getAscent() Returns the ascent of the font described by the receiver. A font's ascent is the distance from the baseline to the top of actual characters, not including any of the leading area, measured in points.
| |
| getAverageCharacterWidth | back to summary |
|---|---|
| public double getAverageCharacterWidth() Returns the average character width, measured in points, of the font described by the receiver.
| |
| getAverageCharWidth | back to summary |
|---|---|
| public int getAverageCharWidth()
Deprecated Use getAverageCharacterWidth() instead Returns the average character width, measured in points, of the font described by the receiver.
| |
| getDescent | back to summary |
|---|---|
| public int getDescent() Returns the descent of the font described by the receiver. A font's descent is the distance from the baseline to the bottom of actual characters, not including any of the leading area, measured in points.
| |
| getHeight | back to summary |
|---|---|
| public int getHeight() Returns the height of the font described by the receiver, measured in points. A font's height is the sum of its ascent, descent and leading area.
| |
| getLeading | back to summary |
|---|---|
| public int getLeading() Returns the leading area of the font described by the receiver. A font's leading area is the space above its ascent which may include accents or other marks.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns an integer hash code for the receiver. Any two
objects that return | |