1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>pango.FontMap</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="pango-class-reference.html" title="The pango Class Reference"><link rel="previous" href="class-pangofontfamily.html" title="pango.FontFamily"><link rel="next" href="class-pangofontmetrics.html" title="pango.FontMetrics"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">pango.FontMap</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-pangofontfamily.html">Prev</a></td><th width="60%" align="center">The pango Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-pangofontmetrics.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-pangofontmap"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>pango.FontMap</h2><p>pango.FontMap — an object that represents the set of fonts available for a
particular rendering system.</p></div><div class="refsect1" lang="en"><a name="id3221173"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">pango.FontMap</span></span>(<span class="ooclass"><span class="classname"><a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a href="class-pangofontmap.html#method-pangofontmap--load-font" title="pango.FontMap.load_font">load_font</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>context</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>desc</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-pangofontmap.html#method-pangofontmap--load-fontset" title="pango.FontMap.load_fontset">load_fontset</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>context</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>desc</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>language</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-pangofontmap.html#method-pangofontmap--list-families" title="pango.FontMap.list_families">list_families</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-pangofontmap.html#method-pangofontmap--get-shape-engine-type" title="pango.FontMap.get_shape_engine_type">get_shape_engine_type</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3205510"></a><h2>Ancestry</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="synopsis">+-- <a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+-- <a href="class-pangofontmap.html" title="pango.FontMap">pango.FontMap</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id2949915"></a><h2>Description</h2><p>A <a href="class-pangofontmap.html" title="pango.FontMap"><tt class="classname">pango.FontMap</tt></a>
object represents the set of fonts available for a particular rendering
system. There appears to be no way to retrieve a <a href="class-pangofontmap.html" title="pango.FontMap"><tt class="classname">pango.FontMap</tt></a>
object in <tt class="literal">PyGTK</tt>.</p></div><div class="refsect1" lang="en"><a name="id3103400"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-pangofontmap--load-font"></a><h3>pango.FontMap.load_font</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load_font</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>context</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>desc</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>context</tt></b>:</span></td><td>the <a href="class-pangocontext.html" title="pango.Context"><tt class="classname">pango.Context</tt></a> the
font will be used with</td></tr><tr><td><span class="term"><b class="parameter"><tt>desc</tt></b>:</span></td><td>a <a href="class-pangofontdescription.html" title="pango.FontDescription"><tt class="classname">pango.FontDescription</tt></a>
describing the font to load</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the loaded font , or <tt class="literal">None</tt> if
no font matched.</td></tr></tbody></table><p>The <tt class="methodname">load_font</tt>() method loads the <a href="class-pangofont.html" title="pango.Font"><tt class="classname">pango.Font</tt></a> in the
fontmap that is the closest match for the <a href="class-pangofontdescription.html" title="pango.FontDescription"><tt class="classname">pango.FontDescription</tt></a>
specified by <i class="parameter"><tt>desc</tt></i> in the <a href="class-pangocontext.html" title="pango.Context"><tt class="classname">pango.Context</tt></a>
specified by <i class="parameter"><tt>context</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-pangofontmap--load-fontset"></a><h3>pango.FontMap.load_fontset</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load_fontset</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>context</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>desc</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>language</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>context</tt></b>:</span></td><td>the <a href="class-pangocontext.html" title="pango.Context"><tt class="classname">pango.Context</tt></a> the
font will be used with</td></tr><tr><td><span class="term"><b class="parameter"><tt>desc</tt></b>:</span></td><td>a <a href="class-pangofontdescription.html" title="pango.FontDescription"><tt class="classname">pango.FontDescription</tt></a>
describing the font to load</td></tr><tr><td><span class="term"><b class="parameter"><tt>language</tt></b>:</span></td><td>a <a href="class-pangolanguage.html" title="pango.Language"><tt class="classname">pango.Language</tt></a>
the fonts will be used for</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-pangofontset.html" title="pango.Fontset"><tt class="classname">pango.FontSet</tt></a>, or
<tt class="literal">None</tt> if no font matched.</td></tr></tbody></table><p>The <tt class="methodname">load_fontset</tt>() method loads a set
of <a href="class-pangofont.html" title="pango.Font"><tt class="classname">pango.Font</tt></a>
objects in the fontmap that can be used to render a font matching the <a href="class-pangofontdescription.html" title="pango.FontDescription"><tt class="classname">pango.FontDescription</tt></a>
specified by <i class="parameter"><tt>desc</tt></i> for the <a href="class-pangolanguage.html" title="pango.Language"><tt class="classname">pango.Language</tt></a>
specified by <i class="parameter"><tt>language</tt></i> in the <a href="class-pangocontext.html" title="pango.Context"><tt class="classname">pango.Context</tt></a>
specified by <i class="parameter"><tt>context</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-pangofontmap--list-families"></a><h3>pango.FontMap.list_families</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">list_families</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a list of <a href="class-pangofontfamily.html" title="pango.FontFamily"><tt class="classname">pango.FontFamily</tt></a>
objects.</td></tr></tbody></table><p>The <tt class="methodname">list_families</tt>() method returns a
list of all <a href="class-pangofontfamily.html" title="pango.FontFamily"><tt class="classname">pango.FontFamily</tt></a>
objects for the fontmap.</p></div><div class="refsect2" lang="en"><a name="method-pangofontmap--get-shape-engine-type"></a><h3>pango.FontMap.get_shape_engine_type</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_shape_engine_type</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> the ID string for the shape engines for the
font map.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <tt class="methodname">get_shape_engine_type</tt>() method
returns the render ID for the shape engines for the font map</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-pangofontfamily.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="pango-class-reference.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="class-pangofontmetrics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">pango.FontFamily</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">pango.FontMetrics</td></tr></table></div></body></html>
|