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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
|
<?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-pangofontface">
<refnamediv>
<refname>pango.FontFace</refname>
<refpurpose>an object representing a group of fonts varying only in
size.</refpurpose>
</refnamediv>
<refsect1>
<title>Synopsis</title>
<classsynopsis language="python">
<ooclass><classname>pango.FontFace</classname></ooclass>
<ooclass><classname><link
linkend="class-gobject">gobject.GObject</link></classname></ooclass>
<methodsynopsis language="python">
<methodname><link
linkend="method-pangofontface--describe">describe</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-pangofontface--get-face-name">get_face_name</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-pangofontface--list-sizes">list_sizes</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
</classsynopsis>
</refsect1>
<refsect1>
<title>Description</title>
<para>A <link
linkend="class-pangofontface"><classname>pango.FontFace</classname></link>
object represents a group of fonts with the same family, weight, slant,
stretch and width but varying sizes. A list of font faces can be retrieved
from a <link
linkend="class-pangofontfamily"><classname>pango.FontFamily</classname></link>
object using the <link
linkend="method-pangofontfamily--list-faces"><methodname>pango.FontFamily.list_faces</methodname>()</link>
method.</para>
</refsect1>
<refsect1>
<title>Ancestry</title>
<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+-- <link linkend="class-pangofontface">pango.FontFace</link>
</synopsis>
</refsect1>
<refsect1>
<title>Methods</title>
<refsect2 id="method-pangofontface--describe">
<title>pango.FontFace.describe</title>
<programlisting><methodsynopsis language="python">
<methodname>describe</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a <link
linkend="class-pangofontdescription"><classname>pango.FontDescription</classname></link>
object containing the description of the face.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>describe</methodname>() method returns a <link
linkend="class-pangofontdescription"><classname>pango.FontDescription</classname></link>
object containing the family, style, variant, weight and stretch of the
<link
linkend="class-pangofontface"><classname>pango.FontFace</classname></link>.
The size attribute field will be unset.</para>
</refsect2>
<refsect2 id="method-pangofontface--get-face-name">
<title>pango.FontFace.get_face_name</title>
<programlisting><methodsynopsis language="python">
<methodname>get_face_name</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the face name for the
face.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_face_name</methodname>() method returns a
string representing this font face. This name is unique among all faces in the
family and is suitable for displaying to users.</para>
</refsect2>
<refsect2 id="method-pangofontface--list-sizes">
<title>pango.FontFace.list_sizes</title>
<programlisting><methodsynopsis language="python">
<methodname>list_sizes</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a tuple containing a list of face sizes in
pango units or <literal>None</literal></simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.4 and above.</para>
</note>
<para>The <methodname>list_sizes</methodname>() method returns a tuple
containing the available sizes for a bitmap font. If the font face is a
scalable font this method returns <literal>None</literal>.</para>
</refsect2>
</refsect1>
</refentry>
|