org.gnu.pango
Class FontMetrics

java.lang.Object
  extended byorg.gnu.glib.Boxed
      extended byorg.gnu.pango.FontMetrics

public class FontMetrics
extends Boxed

A FontMetrics structure holds the overall metric information for a font (possibly restricted to a script).


Field Summary
 
Fields inherited from class org.gnu.glib.Boxed
handle
 
Constructor Summary
protected FontMetrics(Handle handle)
           
 
Method Summary
 int getApproximateCharWidth()
          Gets the approximate character width for the font metrics.
 int getApproximateDigitWidth()
          Gets the approximate digit width for the font metrics.
 int getAscent()
          Gets the ascent from the font metrics.
 int getDescent()
          Gets the descent from the font metrics.
protected static int pango_font_metrics_get_approximate_char_width(Handle metrics)
           
protected static int pango_font_metrics_get_approximate_digit_width(Handle metrics)
           
protected static int pango_font_metrics_get_ascent(Handle metrics)
           
protected static int pango_font_metrics_get_descent(Handle metrics)
           
protected static int pango_font_metrics_get_type()
           
protected static Handle pango_font_metrics_ref(Handle metrics)
           
protected static void pango_font_metrics_unref(Handle metrics)
           
 
Methods inherited from class org.gnu.glib.Boxed
equals, getHandle, hashCode, setHandle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontMetrics

protected FontMetrics(Handle handle)
Method Detail

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.)


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.


pango_font_metrics_get_type

protected static final int pango_font_metrics_get_type()

pango_font_metrics_ref

protected static final Handle pango_font_metrics_ref(Handle metrics)

pango_font_metrics_unref

protected static final void pango_font_metrics_unref(Handle metrics)

pango_font_metrics_get_ascent

protected static final int pango_font_metrics_get_ascent(Handle metrics)

pango_font_metrics_get_descent

protected static final int pango_font_metrics_get_descent(Handle metrics)

pango_font_metrics_get_approximate_char_width

protected static final int pango_font_metrics_get_approximate_char_width(Handle metrics)

pango_font_metrics_get_approximate_digit_width

protected static final int pango_font_metrics_get_approximate_digit_width(Handle metrics)