org.gnu.pango

Class FontMetrics

public class FontMetrics extends Boxed

A FontMetrics structure holds the overall metric information for a font (possibly restricted to a script).
Constructor Summary
FontMetrics(FontMetrics orig)
Method Summary
intgetApproximateCharWidth()
Gets the approximate character width for the font metrics.
intgetApproximateDigitWidth()
Gets the approximate digit width for the font metrics.
intgetAscent()
Gets the ascent from the font metrics.
intgetDescent()
Gets the descent from the font metrics.

Constructor Detail

FontMetrics

public FontMetrics(FontMetrics orig)

Method Detail

getApproximateCharWidth

public int getApproximateCharWidth()
Gets the approximate character width for the font metrics. This is merely a representative value useful, for example, for determining the initial size for a window. Actual characters in text will be wider and narrower than this.

getApproximateDigitWidth

public int getApproximateDigitWidth()
Gets the approximate digit width for the font metrics. This is merely a representative value useful, for example, for determining the initial size for a window. Actual digits in text can be wider and narrower than this.

getAscent

public int getAscent()
Gets the ascent from the font metrics. The ascent is the distance from the baseline to the logical top of a line of text. (The logical top may be above or below the top of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.)

getDescent

public int getDescent()
Gets the descent from the font metrics. The descent is the distance from the baseline to the logical bottom of a line of text. (The logical bottom may be above or below the bottom of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.)