Package org.eclipse.swt.graphics
Class FontMetrics
java.lang.Object
org.eclipse.swt.graphics.FontMetrics
Instances of this class provide measurement information about fonts .
FontMetrics
are obtained from GC
s using the
getFontMetrics()
method.- Since:
- 1.3
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.int
Returns the average character width, measured in pixels, of the font described by the receiver.int
Returns the height of the font described by the receiver, measured in pixels.int
hashCode()
Returns an integer hash code for the receiver.
-
Method Details
-
getAverageCharWidth
public int getAverageCharWidth()Returns the average character width, measured in pixels, of the font described by the receiver.- Returns:
- the average character width of the font
-
getHeight
public int getHeight()Returns the height of the font described by the receiver, measured in pixels. A font's height is the sum of its ascent, descent and leading area.- Returns:
- the height of the font
-
equals
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. -
hashCode
public int hashCode()Returns an integer hash code for the receiver. Any two objects that returntrue
when passed toequals
must return the same value for this method.
-