Font.getFontMetrics

Overview | Methods | Fields | This Package | All Packages

Font.getFontMetrics

Retrieves a FontMetrics object that describes the characteristics of this Font object.

Syntax

public final FontMetrics getFontMetrics()

public final FontMetrics getFontMetrics( Graphics gr )

Parameters

gr

The Graphics object to which to map the font.

Return Value

Returns a FontMetrics object that has been initialized to describe this Font object's underlying font.

Remarks

While a Font object maintains the requested characteristics of a font, a FontMetrics object contains information about the actual font as it will be rendered to a Graphics object. This information may or may not match the requested characteristics, depending on what font information is available. This function assumes a default Graphics object of the screen.