<?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-pangofontmap">
  <refnamediv>
    <refname>pango.FontMap</refname>
    <refpurpose>an object that represents the set of fonts available for a
particular rendering system.</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>pango.FontMap</classname></ooclass>
      <ooclass><classname><link
linkend="class-gobject">gobject.GObject</link></classname></ooclass>
      <methodsynopsis language="python">
	<methodname><link linkend="method-pangofontmap--create-context">create_context</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangofontmap--load-font">load_font</link></methodname>
	<methodparam><parameter
		       role="keyword">context</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">desc</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangofontmap--load-fontset">load_fontset</link></methodname>
	<methodparam><parameter
		       role="keyword">context</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">desc</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">language</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangofontmap--list-families">list_families</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangofontmap--get-shape-engine-type">get_shape_engine_type</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-pangofontmap">pango.FontMap</link>
</synopsis>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>A <link
linkend="class-pangofontmap"><classname>pango.FontMap</classname></link>
object represents the set of fonts available for a particular rendering
system. There appears to be no way to retrieve a <link
linkend="class-pangofontmap"><classname>pango.FontMap</classname></link>
object in <literal>PyGTK</literal>.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-pangofontmap--create-context">
      <title>pango.FontMap.create_context</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>create_context</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the newly allocated
              <link linkend="class-pangocontext"><classname>pango.Context</classname></link>.</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>Creates
        a <link linkend="class-pangocontext"><classname>pango.Context</classname></link>
        connected to fontmap. This is equivalent to calling the class
        constructor followed
        by <link linkend="method-pangocontext--set-font-map">pango.Context.set_font_map</link>.</para>

      <para>If you are using Pango as part of a higher-level system, that system may have
        it's own way of create a <link linkend="class-pangocontext">pango.Context</link>.
        For instance, the GTK+ toolkit has, among others,
        <link linkend="function-gdk--pango-context-get-for-screen">gtk.gdk.pango_context_get_for_screen</link>
        and <link linkend="method-gtkwidget--get-pango-context">gtk.Widget.get_pango_context</link>.
        Use those instead.
      </para>
    </refsect2>

    <refsect2 id="method-pangofontmap--load-font">
      <title>pango.FontMap.load_font</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>load_font</methodname>
	  <methodparam><parameter
			 role="keyword">context</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">desc</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">context</parameter>&nbsp;:</term>
	  <listitem><simpara>the <link
linkend="class-pangocontext"><classname>pango.Context</classname></link> the
font will be used with</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">desc</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-pangofontdescription"><classname>pango.FontDescription</classname></link> 
describing the font to load</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the loaded font , or <literal>None</literal> if
no font matched.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>load_font</methodname>() method loads the <link
linkend="class-pangofont"><classname>pango.Font</classname></link> in the
fontmap that is the closest match for the <link
linkend="class-pangofontdescription"><classname>pango.FontDescription</classname></link> 
specified by <parameter>desc</parameter> in the <link
linkend="class-pangocontext"><classname>pango.Context</classname></link>
specified by <parameter>context</parameter>.</para>

    </refsect2>

    <refsect2 id="method-pangofontmap--load-fontset">
      <title>pango.FontMap.load_fontset</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>load_fontset</methodname>
	  <methodparam><parameter
			 role="keyword">context</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">desc</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">language</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">context</parameter>&nbsp;:</term>
	  <listitem><simpara>the <link
linkend="class-pangocontext"><classname>pango.Context</classname></link> the
font will be used with</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">desc</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-pangofontdescription"><classname>pango.FontDescription</classname></link> 
describing the font to load</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">language</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-pangolanguage"><classname>pango.Language</classname></link>
the fonts will be used for</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-pangofontset"><classname>pango.FontSet</classname></link>, or
<literal>None</literal> if no font matched.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>load_fontset</methodname>() method loads a set
of <link linkend="class-pangofont"><classname>pango.Font</classname></link>
objects in the fontmap that can be used to render a font matching the <link
linkend="class-pangofontdescription"><classname>pango.FontDescription</classname></link> 
specified by <parameter>desc</parameter> for the <link
linkend="class-pangolanguage"><classname>pango.Language</classname></link>
specified by <parameter>language</parameter> in the <link
linkend="class-pangocontext"><classname>pango.Context</classname></link>
specified by <parameter>context</parameter>.</para>

    </refsect2>

    <refsect2 id="method-pangofontmap--list-families">
      <title>pango.FontMap.list_families</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>list_families</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a list of <link
linkend="class-pangofontfamily"><classname>pango.FontFamily</classname></link> 
objects.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>list_families</methodname>() method returns a
list of all <link
linkend="class-pangofontfamily"><classname>pango.FontFamily</classname></link> 
objects for the fontmap.</para>

    </refsect2>

    <refsect2 id="method-pangofontmap--get-shape-engine-type">
      <title>pango.FontMap.get_shape_engine_type</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_shape_engine_type</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara> the ID string for the shape engines for the
	  font map.</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>get_shape_engine_type</methodname>() method
returns the render ID for the shape engines for the font map</para>

    </refsect2>

  </refsect1>

</refentry>
