<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-pangofontmetrics">
  <refnamediv>
    <refname>pango.FontMetrics</refname>
    <refpurpose>an object containing overall metric information for a
font.</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>pango.FontMetrics</classname></ooclass>
      <ooclass><classname>gobject.GBoxed</classname></ooclass>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangofontmetrics--get-ascent">get_ascent</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangofontmetrics--get-descent">get_descent</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangofontmetrics--get-approximate-char-width">get_approximate_char_width</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangofontmetrics--get-approximate-digit-width">get_approximate_digit_width</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>A <link
linkend="class-pangofontmetrics"><classname>pango.FontMetrics</classname></link> 
object holds the overall metric information for a font. A <link
linkend="class-pangofontmetrics"><classname>pango.FontMetrics</classname></link> 
object is returned from the following methods:</para>

    <itemizedlist>
      <listitem>
	<simpara><link
linkend="method-pangocontext--get-metrics"><methodname>pango.Context.get_metrics</methodname>()</link></simpara>
      </listitem>
      <listitem>
	<simpara><link
linkend="method-pangofont--get-metrics"><methodname>pango.Font.get_metrics</methodname>()</link></simpara>
      </listitem>
      <listitem>
	<simpara><link
linkend="method-pangofontset--get-metrics"><methodname>pango.Fontset.get_metrics</methodname>()</link></simpara>
      </listitem>
    </itemizedlist>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-pangofontmetrics--get-ascent">
      <title>pango.FontMetrics.get_ascent</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_ascent</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the ascent in pango units. (1 point ==
<literal>pango.SCALE</literal> pango units.)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_ascent</methodname>() method returns the
font ascent in pango units where one font point is equal to pango.SCALE
(1024) pango units. 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.)</para>

    </refsect2>

    <refsect2 id="method-pangofontmetrics--get-descent">
      <title>pango.FontMetrics.get_descent</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_descent</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the descent in pango units. (1 point ==
<literal>pango.SCALE</literal> pango units.)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_descent</methodname>() method returns the
font descent in pango units where one font point is equal to pango.SCALE
(1024) pango units. 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.)</para>

    </refsect2>

    <refsect2 id="method-pangofontmetrics--get-approximate-char-width">
      <title>pango.FontMetrics.get_approximate_char_width</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_approximate_char_width</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the character width in pango units. (1 point ==
<literal>pango.SCALE</literal> pango units.)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_approximate_char_width</methodname>() method
returns the approximate character width for a font in pango units where one
font point is equal to pango.SCALE (1024) pango units. This is merely a
representative value that is useful, for example, for determining the
initial size for a window. Actual characters in text will be wider and
narrower than this.</para>

    </refsect2>

    <refsect2 id="method-pangofontmetrics--get-approximate-digit-width">
      <title>pango.FontMetrics.get_approximate_digit_width</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_approximate_digit_width</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the digit width in pango units. (1 point ==
<literal>pango.SCALE</literal> pango units.)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_approximate_digit_width</methodname>()
method returns the approximate digit width for a font in pango units where
one font point is equal to pango.SCALE (1024) pango units. This is merely a
representative value that is useful, for example, for determining the
initial size for a window. Actual digits in text can be wider and narrower
than this, though this value is generally somewhat more accurate than the
result of the <link
linkend="method-pangofontmetrics--get-approximate-char-width"><methodname>get_approximate_char_width</methodname>()</link> 
method.</para>

    </refsect2>

  </refsect1>

</refentry>
