blob: e4db50a94c3fd3fbe83933a8f07aa48f39bd5043 (
plain)
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
139
140
141
142
143
144
145
146
147
148
|
<?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-pangofontfamily">
<refnamediv>
<refname>pango.FontFamily</refname>
<refpurpose>an object representing a family of related font
faces.</refpurpose>
</refnamediv>
<refsect1>
<title>Synopsis</title>
<classsynopsis language="python">
<ooclass><classname>pango.FontFamily</classname></ooclass>
<ooclass><classname><link
linkend="class-gobject">gobject.GObject</link></classname></ooclass>
<methodsynopsis language="python">
<methodname><link
linkend="method-pangofontfamily--list-faces">list_faces</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-pangofontfamily--get-name">get_name</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-pangofontfamily--is-monospace">is_monospace</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
</classsynopsis>
</refsect1>
<refsect1>
<title>Ancestry</title>
<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+-- <link linkend="class-pangofontfamily">pango.FontFamily</link>
</synopsis>
</refsect1>
<refsect1>
<title>Description</title>
<para>The <link
linkend="class-pangofontfamily"><classname>pango.FontFamily</classname></link>
object is used to represent a family of related font faces. The faces in a
family share a common design, but differ in slant, weight, width and other
aspects. A list of <link
linkend="class-pangofontfamily"><classname>pango.FontFamily</classname></link>
objects can be retrieved from a <link
linkend="class-pangocontext"><classname>pango.Context</classname></link>
object using the <link
linkend="method-pangocontext--list-families"><methodname>pango.Context.list_families</methodname>()</link>
method and from a <link
linkend="class-pangofontmap"><classname>pango.FontMap</classname></link>
object using the <link
linkend="method-pangofontmap--list-families"><methodname>pango.FontMap.list_families</methodname>()</link>
method.</para>
</refsect1>
<refsect1>
<title>Methods</title>
<refsect2 id="method-pangofontfamily--list-faces">
<title>pango.FontFamily.list_faces</title>
<programlisting><methodsynopsis language="python">
<methodname>list_faces</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a list of <link
linkend="class-pangofontface"><classname>pango.FontFace</classname></link>
objects.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>list_faces</methodname>() method returns a list
of the different <link
linkend="class-pangofontface"><classname>pango.FontFace</classname></link>
object that make up the font family>. The faces in a family share a common
design, but differ in slant, weight, width and other aspects.</para>
</refsect2>
<refsect2 id="method-pangofontfamily--get-name">
<title>pango.FontFamily.get_name</title>
<programlisting><methodsynopsis language="python">
<methodname>get_name</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the name of the family.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_name</methodname>() method returns a string
containing the name of the font family. The name is unique among all fonts
for the font backend and can be used in a <link
linkend="class-pangofontdescription"><classname>pango.FontDescription</classname></link>
to specify that a face from this family is desired.</para>
</refsect2>
<refsect2 id="method-pangofontfamily--is-monospace">
<title>pango.FontFamily.is_monospace</title>
<programlisting><methodsynopsis language="python">
<methodname>is_monospace</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if the font family is
monospace.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>is_monospace</methodname>() method returns
<literal>True</literal> if the font family describes a monospace
font. A monospace font is a font designed for text display where the
the characters form a regular grid. For Western languages this would
mean that the advance width of all characters are the same, but this
categorization also includes Asian fonts which include double-width
characters: characters that occupy two grid cells. The best way to
find out the grid-cell size is to call the <link
linkend="method-pangofontmetrics--get-approximate-digit-width"><methodname>get_approximate_digit_width</methodname>()</link>
method, since the results of the <link
linkend="method-pangofontmetrics--get-approximate-char-width"><methodname>get_approximate_char_width</methodname>()</link></para>
</refsect2>
</refsect1>
</refentry>
|