Eclipse Rich Ajax Platform Release 1.3

## org.eclipse.swt.graphics
Class FontMetrics

    java.lang.Object
      org.eclipse.swt.graphics.FontMetrics

public final class FontMetrics
extends Object

Instances of this class provide measurement information about fonts . `FontMetrics` are obtained from `GC`s using the `getFontMetrics()` method.

Since:
  1.3
See Also:
  `GC.getFontMetrics()`

Method Summary
`boolean` `equals(Object object)` Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
`int` `getAverageCharWidth()` Returns the average character width, measured in pixels, of the font described by the receiver.
`int` `getHeight()` Returns the height of the font described by the receiver, measured in pixels.
`int` `hashCode()` Returns an integer hash code for the receiver.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### 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
  See Also:
    `#getAscent`, `#getDescent`, `#getLeading`

### equals

    public boolean equals(Object object)

  Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.

  Parameters:
    `object` - the object to compare with this object
  Returns:
    `true` if the object is the same as this object and `false` otherwise
  See Also:
    `hashCode()`

### hashCode

    public int hashCode()

  Returns an integer hash code for the receiver. Any two objects that return `true` when passed to `equals` must return the same value for this method.

  Returns:
    the receiver's hash
  See Also:
    `equals(java.lang.Object)`

Eclipse Rich Ajax Platform Release 1.3

Copyright (c) Innoopract Informationssysteme GmbH and others 2002, 2011. All rights reserved.