<?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-pangofontset">
  <refnamediv>
    <refname>pango.Fontset</refname>
    <refpurpose>an object containing a set of <link
linkend="class-pangofont"><classname>pango.Font</classname></link>
objects.</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>pango.Fontset</classname></ooclass>
      <ooclass><classname><link
linkend="class-gobject">gobject.GObject</link></classname></ooclass>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangofontset--get-font">get_font</link></methodname>
	<methodparam><parameter role="keyword">wc</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangofontset--get-metrics">get_metrics</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangofontset--foreach">foreach</link></methodname>
	<methodparam><parameter role="keyword">func</parameter></methodparam>
	<methodparam><parameter role="keyword">data</parameter><initializer>None</initializer></methodparam>
      </methodsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-pangofontset">pango.Fontset</link>
</synopsis>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>A <link
linkend="class-pangofontset"><classname>pango.Fontset</classname></link>
object holds a set of <link
linkend="class-pangofont"><classname>pango.Font</classname></link> objects.
A <link
linkend="class-pangofontset"><classname>pango.FontSet</classname></link>
object is returned from the following methods:</para>

    <itemizedlist>
      <listitem>
	<simpara><link
linkend="method-pangocontext--load-fontset"><methodname>pango.Context.load_fontset</methodname>()</link></simpara>
      </listitem>
      <listitem>
	<simpara><link
linkend="method-pangofontmap--load-fontset"><methodname>pango.FontMap.load_fontset</methodname>()</link></simpara>
      </listitem>
    </itemizedlist>

  </refsect1>

  <refsect1>
    <title>Methods</title>

  <refsect2 id="method-pangofontset--get-font">
      <title>pango.Fontset.get_font</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_font</methodname>
	  <methodparam><parameter
			 role="keyword">wc</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">wc</parameter>&nbsp;:</term>
	  <listitem><simpara>a unicode character</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-pangofont"><classname>pango.Font</classname></link>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_font</methodname>() method returns the <link
linkend="class-pangofont"><classname>pango.Font</classname></link> in the
fontset that contains the best glyph for the unicode character specified by
<parameter>wc</parameter>.</para>

    </refsect2>

    <refsect2 id="method-pangofontset--get-metrics">
      <title>pango.Fontset.get_metrics</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_metrics</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a <link
	  linkend="class-pangofontmetrics"><classname>pango.FontMetrics</classname></link>
	  object.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_metrics</methodname>() method returns a
<link
linkend="class-pangofontmetrics"><classname>pango.FontMetrics</classname></link> 
object that contains the overall metric information for the fonts in the
fontset.</para>

    </refsect2>

  <refsect2 id="method-pangofontset--foreach">
      <title>pango.Fontset.foreach</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>foreach</methodname>
	<methodparam><parameter role="keyword">func</parameter></methodparam>
	<methodparam><parameter role="keyword">data</parameter><initializer>None</initializer></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">func</parameter>&nbsp;:</term>
	  <listitem><simpara>a callback function</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">data</parameter>&nbsp;:</term>
	  <listitem><simpara>user data to pass to
	  <parameter>func</parameter></simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This method is available in PyGTK 2.4 and above.</para>
      </note>

      <para>The <methodname>foreach</methodname>() method invokes the
function specified by <parameter>func</parameter> on each <link
linkend="class-pangofont"><classname>pango.Font</classname></link> of the
font set passing it the optional user data specified by
<parameter>data</parameter>. The signature of <parameter>func</parameter>
is:</para>

      <programlisting>
  def func(fontset, font, user_data)
</programlisting>

      <para>where <parameter>fontset</parameter> is the <link
linkend="class-pangofontset"><classname>pango.Fontset</classname></link>
containing the <link
linkend="class-pangofont"><classname>pango.Font</classname></link>
<parameter>font</parameter> and <parameter>user_data</parameter> is
<parameter>data</parameter></para>

    </refsect2>

  </refsect1>

</refentry>
