File: class-pangoattribute.html

package info (click to toggle)
python-gtk2-doc 2.5.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,304 kB
  • ctags: 3,741
  • sloc: makefile: 38
file content (205 lines) | stat: -rw-r--r-- 64,339 bytes parent folder | download
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>pango.Attribute</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="pango-class-reference.html" title="The pango Class Reference"><link rel="next" href="class-pangoattriterator.html" title="pango.AttrIterator"></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.Attribute</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pango-class-reference.html">Prev</a></td><th width="60%" align="center">The pango Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-pangoattriterator.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-pangoattribute"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>pango.Attribute</h2><p>pango.Attribute &#8212; an attribute that applies to a section of text</p></div><div class="refsect1" lang="en"><a name="id3261171"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">pango.Attribute</span></span>:
<code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#method-pangoattribute--copy" title="pango.Attribute.copy">copy</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
<span class="bold"><b>Functions</b></span>

<code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attr-type-register" title="pango.attr_type_register">pango.attr_type_register</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrlanguage" title="pango.AttrLanguage">pango.AttrLanguage</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>language</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrfamily" title="pango.AttrFamily">pango.AttrFamily</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>family</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrforeground" title="pango.AttrForeground">pango.AttrForeground</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>red</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>green</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>blue</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrbackground" title="pango.AttrBackground">pango.AttrBackground</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>red</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>green</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>blue</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrsize" title="pango.AttrSize">pango.AttrSize</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>size</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrstyle" title="pango.AttrStyle">pango.AttrStyle</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>style</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrweight" title="pango.AttrWeight">pango.AttrWeight</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>weight</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrvariant" title="pango.AttrVariant">pango.AttrVariant</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>variant</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrstretch" title="pango.AttrStretch">pango.AttrStretch</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>stretch</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrfontdesc" title="pango.AttrFontDesc">pango.AttrFontDesc</a></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>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrunderline" title="pango.AttrUnderline">pango.AttrUnderline</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>underline</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrstrikethrough" title="pango.AttrStrikethrough">pango.AttrStrikethrough</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>strikethrough</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrrise" title="pango.AttrRise">pango.AttrRise</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>rise</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrshape" title="pango.AttrShape">pango.AttrShape</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>ink_rect</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>logical_rect</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrscale" title="pango.AttrScale">pango.AttrScale</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>scale</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoattribute.html#function-pango--attrfallback" title="pango.AttrFallback">pango.AttrFallback</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>fallback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</span></span>)</code></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3091771"></a><h2>Attributes</h2><p>All <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
objects support the following three attributes.</p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"end_index"</td><td valign="top">Read-Write</td><td valign="top">The index of the end of the application of the
attribute in the associated text.</td></tr><tr valign="top"><td valign="top">"start_index"</td><td valign="top">Read-Write</td><td valign="top">The index of the start of the application of the
attribute in the associated text.</td></tr><tr valign="top"><td valign="top">"type"</td><td valign="top">Read</td><td valign="top">The attribute type.</td></tr></tbody></table></div></td></tr></table></div><p>In addition each <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
type supports one or more additional attributes that are specific to the
type:</p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_LANGUAGE</tt></td><td valign="top">The <a href="class-pangolanguage.html" title="pango.Language"><tt class="classname">pango.Language</tt></a>.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_FAMILY</tt></td><td valign="top">The string containing the font family name list (e.g.
"normal,sans,serif,monospace")</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_STYLE</tt></td><td valign="top">The font slant style. See the <a href="class-pangoattribute.html#function-pango--attrstyle" title="pango.AttrStyle"><tt class="function">pango.AttrStyle</tt>()</a> 
function for more details.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_WEIGHT</tt></td><td valign="top">The font weight. See the <a href="class-pangoattribute.html#function-pango--attrweight" title="pango.AttrWeight"><tt class="function">pango.AttrWeight</tt>()</a> 
function for more detail.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_VARIANT</tt></td><td valign="top">The font variant. See the <a href="class-pangoattribute.html#function-pango--attrvariant" title="pango.AttrVariant"><tt class="function">pango.AttrVariant</tt>()</a> 
function for more detail.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_STRETCH</tt></td><td valign="top">The font stretch. See the <a href="class-pangoattribute.html#function-pango--attrstretch" title="pango.AttrStretch"><tt class="function">pango.AttrStretch</tt>()</a> 
function for more details.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_SIZE</tt></td><td valign="top">The font size.in thousandths of a point.</td></tr><tr valign="top"><td valign="top">"desc"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_FONT_DESC</tt></td><td valign="top">The <a href="class-pangofontdescription.html" title="pango.FontDescription"><tt class="classname">pango.FontDescription</tt></a> 
object.</td></tr><tr valign="top"><td valign="top">"color"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_FOREGROUND</tt></td><td valign="top">The foreground <a href="class-pangocolor.html" title="pango.Color"><tt class="classname">pango.Color</tt></a>
object.</td></tr><tr valign="top"><td valign="top">"color"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_BACKGROUND</tt></td><td valign="top">The background <a href="class-pangocolor.html" title="pango.Color"><tt class="classname">pango.Color</tt></a>
object.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_UNDERLINE</tt></td><td valign="top">The underline style. See the <a href="class-pangoattribute.html#function-pango--attrunderline" title="pango.AttrUnderline"><tt class="function">pango.AttrUnderline</tt>()</a> 
function for more details.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_STRIKETHROUGH</tt></td><td valign="top"><tt class="literal">TRUE</tt> if the text is struck
through.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_RISE</tt></td><td valign="top">The displacement of the text from the baseline.</td></tr><tr valign="top"><td valign="top">"ink_rect"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_SHAPE</tt></td><td valign="top">The 4-tuple specifying the ink rectangle. See the <a href="class-pangoattribute.html#function-pango--attrshape" title="pango.AttrShape"><tt class="function">pango.AttrShape</tt>()</a> 
function for more details.</td></tr><tr valign="top"><td valign="top">"logical_rect"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_SHAPE</tt></td><td valign="top">The 4-tuple specifying the logical rectangle. See the
<a href="class-pangoattribute.html#function-pango--attrshape" title="pango.AttrShape"><tt class="function">pango.AttrShape</tt>()</a> 
function for more details.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_SCALE</tt></td><td valign="top">The font size scale factor as a float.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><tt class="literal">ATTR_FALLBACK</tt></td><td valign="top"><tt class="literal">TRUE</tt> if font fallback is
	      enabled.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3065837"></a><h2>Description</h2><p>The <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object contains an attribute that applies to a section of text. The
predefined attribute types are:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">pango.ATTR_LANGUAGE</tt></span></td><td>Specifies a <a href="class-pangolanguage.html" title="pango.Language"><tt class="classname">pango.Language</tt></a>.</td></tr><tr><td><span class="term"><tt class="literal">pango.ATTR_FAMILY</tt></span></td><td>Specifies a font family name list as a string.</td></tr><tr><td><span class="term"><tt class="literal">pango.ATTR_STYLE</tt></span></td><td>Specifies a font slant style. See the <a href="class-pangoattribute.html#function-pango--attrstyle" title="pango.AttrStyle"><tt class="function">pango.AttrStyle</tt>()</a> 
function for more details.</td></tr><tr><td><span class="term"><tt class="literal">pango.ATTR_WEIGHT</tt></span></td><td>Specifies a font weight. See the <a href="class-pangoattribute.html#function-pango--attrweight" title="pango.AttrWeight"><tt class="function">pango.AttrWeight</tt>()</a> 
function for more detail.</td></tr><tr><td><span class="term"><tt class="literal">pango.ATTR_VARIANT</tt></span></td><td>Specifies a font variant (normal or small caps). See the
<a href="class-pangoattribute.html#function-pango--attrvariant" title="pango.AttrVariant"><tt class="function">pango.AttrVariant</tt>()</a> 
function for more detail.</td></tr><tr><td><span class="term"><tt class="literal">pango.ATTR_STRETCH</tt></span></td><td>Specifies a font stretch. See the <a href="class-pangoattribute.html#function-pango--attrstretch" title="pango.AttrStretch"><tt class="function">pango.AttrStretch</tt>()</a> 
function for more details.</td></tr><tr><td><span class="term"><tt class="literal">pango.ATTR_SIZE</tt></span></td><td>Specifies a font size in thousandths of a point.</td></tr><tr><td><span class="term"><tt class="literal">pango.ATTR_FONT_DESC</tt></span></td><td>Specifies a <a href="class-pangofontdescription.html" title="pango.FontDescription"><tt class="classname">pango.FontDescription</tt></a>.</td></tr><tr><td><span class="term"><tt class="literal">pango.ATTR_FOREGROUND</tt></span></td><td>Specifies a foreground <a href="class-pangocolor.html" title="pango.Color"><tt class="classname">pango.Color</tt></a>.</td></tr><tr><td><span class="term"><tt class="literal">pango.ATTR_BACKGROUND</tt></span></td><td>Specifies a background <a href="class-pangocolor.html" title="pango.Color"><tt class="classname">pango.Color</tt></a>.</td></tr><tr><td><span class="term"><tt class="literal">pango.ATTR_UNDERLINE</tt></span></td><td>Specifies an underline style. See the <a href="class-pangoattribute.html#function-pango--attrunderline" title="pango.AttrUnderline"><tt class="function">pango.AttrUnderline</tt>()</a> 
function for more details.</td></tr><tr><td><span class="term"><tt class="literal">pango.ATTR_STRIKETHROUGH</tt></span></td><td>If <tt class="literal">TRUE</tt> the text is struck
through.</td></tr><tr><td><span class="term"><tt class="literal">pango.ATTR_RISE</tt></span></td><td>Specifies the displacement of the text from the
baseline.</td></tr><tr><td><span class="term"><tt class="literal">pango.ATTR_SHAPE</tt></span></td><td>Specifies a shape. See the <a href="class-pangoattribute.html#function-pango--attrshape" title="pango.AttrShape"><tt class="function">pango.AttrShape</tt>()</a> 
function for more details.</td></tr><tr><td><span class="term"><tt class="literal">pango.ATTR_SCALE</tt></span></td><td>Specifies a font size scale factor.</td></tr><tr><td><span class="term"><tt class="literal">pango.ATTR_FALLBACK</tt></span></td><td>if <tt class="literal">TRUE</tt>, fallback to other fonts is
	  enabled (</td></tr></tbody></table><p>Additional attribute types can be registered with the <a href="class-pangoattribute.html#function-pango--attr-type-register" title="pango.attr_type_register"><tt class="function">pango.attr_type_register</tt>()</a> 
function.</p></div><div class="refsect1" lang="en"><a name="id3158576"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-pangoattribute--copy"></a><h3>pango.Attribute.copy</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">copy</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 new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object</td></tr></tbody></table><p>The <tt class="methodname">copy</tt>() method returns a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object that is a copy of this attribute.</p></div></div><div class="refsect1" lang="en"><a name="id3214785"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-pango--attr-type-register"></a><h3>pango.attr_type_register</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.attr_type_register</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</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>name</tt></b>:</span></td><td>a name for the type. (Currently not
used.)</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the new attribute type ID
integer.</td></tr></tbody></table><p>The <tt class="function">attr_type_register</tt>() function returns a
new attribute type ID integer value.</p></div><div class="refsect2" lang="en"><a name="function-pango--attrlanguage"></a><h3>pango.AttrLanguage</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrLanguage</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>language</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>language</tt></b>:</span></td><td>a <a href="class-pangolanguage.html" title="pango.Language"><tt class="classname">pango.Language</tt></a>
object.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object.</td></tr></tbody></table><p>The <tt class="function">AttrLanguage</tt>() function creates a new
<a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object of the type <tt class="literal">pango.ATTR_LANGUAGE</tt> with 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> and the text range specified by
<i class="parameter"><tt>start_index</tt></i> and
<i class="parameter"><tt>end_index</tt></i>.</p></div><div class="refsect2" lang="en"><a name="function-pango--attrfamily"></a><h3>pango.AttrFamily</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrFamily</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>family</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>family</tt></b>:</span></td><td>the string containing a font family name
list.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object.</td></tr></tbody></table><p>The <tt class="function">AttrFamily</tt>() function creates a new
<a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object of the type <tt class="literal">pango.ATTR_FAMILY</tt> with the font family
name list specified by the string <i class="parameter"><tt>family</tt></i> and the text
range specified by <i class="parameter"><tt>start_index</tt></i> and
<i class="parameter"><tt>end_index</tt></i>.</p></div><div class="refsect2" lang="en"><a name="function-pango--attrforeground"></a><h3>pango.AttrForeground</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrForeground</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>red</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>green</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>blue</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>red</tt></b>:</span></td><td>the red component of the color in the range 0
to 65535.</td></tr><tr><td><span class="term"><b class="parameter"><tt>green</tt></b>:</span></td><td>the green component of the color in the range 0
to 65535.</td></tr><tr><td><span class="term"><b class="parameter"><tt>blue</tt></b>:</span></td><td>the blue component of the color in the range 0
to 65535.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object.</td></tr></tbody></table><p>The <tt class="function">AttrForeground</tt>() function creates a new
<a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
of the type <tt class="literal">pango.ATTR_FOREGROUND</tt> with the RGB color
specified by <i class="parameter"><tt>red</tt></i>, <i class="parameter"><tt>green</tt></i> and
<i class="parameter"><tt>blue</tt></i> and the text range specified by
<i class="parameter"><tt>start_index</tt></i> and
<i class="parameter"><tt>end_index</tt></i>.</p></div><div class="refsect2" lang="en"><a name="function-pango--attrbackground"></a><h3>pango.AttrBackground</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrBackground</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>red</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>green</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>blue</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>red</tt></b>:</span></td><td>the red component of the color in the range 0
to 65535.</td></tr><tr><td><span class="term"><b class="parameter"><tt>green</tt></b>:</span></td><td>the green component of the color in the range 0
to 65535.</td></tr><tr><td><span class="term"><b class="parameter"><tt>blue</tt></b>:</span></td><td>the blue component of the color in the range 0
to 65535.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object.</td></tr></tbody></table><p>The <tt class="function">AttrBackground</tt>() function creates a new
pangoAttribute of the type <tt class="literal">pango.ATTR_BACKGROUND</tt> with the
RGB color specified by <i class="parameter"><tt>red</tt></i>,
<i class="parameter"><tt>green</tt></i> and <i class="parameter"><tt>blue</tt></i> and the text
range specified by <i class="parameter"><tt>start_index</tt></i> and
<i class="parameter"><tt>end_index</tt></i>.</p></div><div class="refsect2" lang="en"><a name="function-pango--attrsize"></a><h3>pango.AttrSize</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrSize</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>size</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>size</tt></b>:</span></td><td>the font size in thousandths of a
point.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object</td></tr></tbody></table><p>The <tt class="function">AttrSize</tt>() function creates a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object of the type <tt class="literal">pango.ATTR_SIZE</tt> with the font size
specified by <i class="parameter"><tt>size</tt></i> and the text range specified by
<i class="parameter"><tt>start_index</tt></i> and
<i class="parameter"><tt>end_index</tt></i>.</p></div><div class="refsect2" lang="en"><a name="function-pango--attrstyle"></a><h3>pango.AttrStyle</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrStyle</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>style</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>style</tt></b>:</span></td><td>the font slant style.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object</td></tr></tbody></table><p>The <tt class="function">AttrStyle</tt>() function creates a new
<a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object of the type <tt class="literal">pango.ATTR_STYLE</tt> with the font slant
style specified by <i class="parameter"><tt>style</tt></i> and the text range specified
by <i class="parameter"><tt>start_index</tt></i> and <i class="parameter"><tt>end_index</tt></i>.
The value of <i class="parameter"><tt>style</tt></i> must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">pango.STYLE_NORMAL</tt></span></td><td>The font is upright.</td></tr><tr><td><span class="term"><tt class="literal">pango.STYLE_OBLIQUE</tt></span></td><td>The font is slanted in a roman style.</td></tr><tr><td><span class="term"><tt class="literal">pango.STYLE_ITALIC</tt></span></td><td>The font is slanted in an italic style.</td></tr></tbody></table><p></p></div><div class="refsect2" lang="en"><a name="function-pango--attrweight"></a><h3>pango.AttrWeight</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrWeight</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>weight</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>weight</tt></b>:</span></td><td>the font weight.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object</td></tr></tbody></table><p>The <tt class="function">AttrWeight</tt>() function creates a new
<a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object of the type <tt class="literal">pango.ATTR_WEIGHT</tt> with the font weight
specified by <i class="parameter"><tt>weight</tt></i> and the text range specified by
<i class="parameter"><tt>start_index</tt></i> and <i class="parameter"><tt>end_index</tt></i>. The
value of <i class="parameter"><tt>style</tt></i> must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">pango.WEIGHT_ULTRALIGHT</tt></span></td><td>The ultralight weight (= 200).</td></tr><tr><td><span class="term"><tt class="literal">pango.WEIGHT_LIGHT</tt></span></td><td>The light weight (=300).</td></tr><tr><td><span class="term"><tt class="literal">pango.WEIGHT_NORMAL</tt></span></td><td>The default weight (= 400).</td></tr><tr><td><span class="term"><tt class="literal">pango.WEIGHT_BOLD</tt></span></td><td>The bold weight (= 700).</td></tr><tr><td><span class="term"><tt class="literal">pango.WEIGHT_ULTRABOLD</tt></span></td><td>The ultrabold weight (= 800).</td></tr><tr><td><span class="term"><tt class="literal">pango.WEIGHT_HEAVY</tt></span></td><td>The heavy weight (= 900).</td></tr></tbody></table><p></p></div><div class="refsect2" lang="en"><a name="function-pango--attrvariant"></a><h3>pango.AttrVariant</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrVariant</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>variant</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>variant</tt></b>:</span></td><td>the font variant.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object</td></tr></tbody></table><p>The <tt class="function">AttrVariant</tt>() function creates a new
<a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object of the type <tt class="literal">pango.ATTR_VARIANT</tt> with the font
variant specified by <i class="parameter"><tt>variant</tt></i> and the text range
specified by <i class="parameter"><tt>start_index</tt></i> and
<i class="parameter"><tt>end_index</tt></i>. The value of
<i class="parameter"><tt>variant</tt></i> must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">pango.VARIANT_NORMAL</tt></span></td><td>A normal font.</td></tr><tr><td><span class="term"><tt class="literal">pango.VARIANT_SMALL_CAPS</tt></span></td><td>A font with the lower case characters replaced by
smaller variants of the capital characters.</td></tr></tbody></table><p></p></div><div class="refsect2" lang="en"><a name="function-pango--attrstretch"></a><h3>pango.AttrStretch</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrStretch</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>stretch</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>stretch</tt></b>:</span></td><td>the font stretch style.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object</td></tr></tbody></table><p>The <tt class="function">AttrStretch</tt>() function creates a new
<a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object of the type <tt class="literal">pango.ATTR_STRETCH</tt> with the font
stretch style specified by <i class="parameter"><tt>stretch</tt></i> and the text range
specified by <i class="parameter"><tt>start_index</tt></i> and
<i class="parameter"><tt>end_index</tt></i>. The value of
<i class="parameter"><tt>stretch</tt></i> must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">pango.STRETCH_ULTRA_CONDENSED</tt></span></td><td>The most narrow width</td></tr><tr><td><span class="term"><tt class="literal">pango.STRETCH_EXTRA_CONDENSED</tt></span></td><td></td></tr><tr><td><span class="term"><tt class="literal">pango.STRETCH_CONDENSED</tt></span></td><td></td></tr><tr><td><span class="term"><tt class="literal">pango.STRETCH_SEMI_CONDENSED</tt></span></td><td></td></tr><tr><td><span class="term"><tt class="literal">pango.STRETCH_NORMAL</tt></span></td><td>The normal width.</td></tr><tr><td><span class="term"><tt class="literal">pango.STRETCH_SEMI_EXPANDED</tt></span></td><td></td></tr><tr><td><span class="term"><tt class="literal">pango.STRETCH_EXPANDED</tt></span></td><td></td></tr><tr><td><span class="term"><tt class="literal">pango.STRETCH_EXTRA_EXPANDED</tt></span></td><td></td></tr><tr><td><span class="term"><tt class="literal">pango.STRETCH_ULTRA_EXPANDED</tt></span></td><td>The most expanded width</td></tr></tbody></table><p></p></div><div class="refsect2" lang="en"><a name="function-pango--attrfontdesc"></a><h3>pango.AttrFontDesc</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrFontDesc</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>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>desc</tt></b>:</span></td><td>a <a href="class-pangofontdescription.html" title="pango.FontDescription"><tt class="classname">pango.FontDescription</tt></a> 
object.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object</td></tr></tbody></table><p>The <tt class="function">AttrFontDesc</tt>() function creates a new
<a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object of the type <tt class="literal">pango.ATTR_FONT_DESC</tt> with 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> and the text range specified by
<i class="parameter"><tt>start_index</tt></i> and
<i class="parameter"><tt>end_index</tt></i>.</p></div><div class="refsect2" lang="en"><a name="function-pango--attrunderline"></a><h3>pango.AttrUnderline</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrUnderline</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>underline</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>underline</tt></b>:</span></td><td>the underline style.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object</td></tr></tbody></table><p>The <tt class="function">AttrUnderline</tt>() function creates a new
<a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object of the type <tt class="literal">pango.ATTR_UNDERLINE</tt> with the
underline style specified by <i class="parameter"><tt>underline</tt></i> and the text
range specified by <i class="parameter"><tt>start_index</tt></i> and
<i class="parameter"><tt>end_index</tt></i>. The value of
<i class="parameter"><tt>underline</tt></i> must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">pango.UNDERLINE_NONE</tt></span></td><td>No underline should be drawn.</td></tr><tr><td><span class="term"><tt class="literal">pango.UNDERLINE_SINGLE</tt></span></td><td>A single underline should be drawn.</td></tr><tr><td><span class="term"><tt class="literal">pango.UNDERLINE_DOUBLE</tt></span></td><td>A double underline should be drawn.</td></tr><tr><td><span class="term"><tt class="literal">pango.UNDERLINE_LOW</tt></span></td><td>A single underline should be drawn at a position
beneath the ink extents of the text being underlined. This should be used
only for underlining single characters, such as for keyboard accelerators.
<tt class="literal">pango.UNDERLINE_SINGLE</tt> should be used for extended
portions of text.</td></tr></tbody></table><p></p></div><div class="refsect2" lang="en"><a name="function-pango--attrstrikethrough"></a><h3>pango.AttrStrikethrough</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrStrikethrough</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>strikethrough</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>strikethrough</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> the text should be
struck through.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object</td></tr></tbody></table><p>The <tt class="function">AttrStrikethrough</tt>() function creates a
new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object of the type <tt class="literal">pango.ATTR_STRIKETHROUGH</tt> with the
value specified by <i class="parameter"><tt>strikethrough</tt></i> and the text range
specified by <i class="parameter"><tt>start_index</tt></i> and
<i class="parameter"><tt>end_index</tt></i>. If strikethough is <tt class="literal">TRUE</tt>
the text should be struck through.</p></div><div class="refsect2" lang="en"><a name="function-pango--attrrise"></a><h3>pango.AttrRise</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrRise</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>rise</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>rise</tt></b>:</span></td><td>the displacement of the text from the
baseline.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object</td></tr></tbody></table><p>The <tt class="function">AttrRise</tt>() function creates a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object of the type <tt class="literal">pango.ATTR_RISE</tt> with the text
displacement from the baseline specified by <i class="parameter"><tt>rise</tt></i> and
the text range specified by <i class="parameter"><tt>start_index</tt></i> and
<i class="parameter"><tt>end_index</tt></i>.</p></div><div class="refsect2" lang="en"><a name="function-pango--attrshape"></a><h3>pango.AttrShape</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrShape</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>ink_rect</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>logical_rect</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>ink_rect</tt></b>:</span></td><td>the ink rectangle of the
shape.</td></tr><tr><td><span class="term"><b class="parameter"><tt>logical_rect</tt></b>:</span></td><td>the logical rectangle of the
shape.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object</td></tr></tbody></table><p>The <tt class="function">AttrShape</tt>() function creates a new
<a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object of the type <tt class="literal">pango.ATTR_SHAPE</tt> with the shape
rectangles specified by <i class="parameter"><tt>ink_rect</tt></i> and
<i class="parameter"><tt>logical_rect</tt></i> and the text range specified by
<i class="parameter"><tt>start_index</tt></i> and <i class="parameter"><tt>end_index</tt></i>. A
shape is used to impose a particular ink and logical rect on the result of
shaping a particular glyph. This might be used, for instance, for embedding
a picture or a widget inside a <a href="class-pangolayout.html" title="pango.Layout"><tt class="classname">pango.Layout</tt></a>.</p></div><div class="refsect2" lang="en"><a name="function-pango--attrscale"></a><h3>pango.AttrScale</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrScale</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>scale</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>scale</tt></b>:</span></td><td>the font size scale factor as a
float.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object</td></tr></tbody></table><p>The <tt class="function">AttrScale</tt>() function creates a new
<a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object of the type <tt class="literal">pango.ATTR_SCALE</tt> with the font size
scale factor specified by <i class="parameter"><tt>scale</tt></i> and the text range
specified by <i class="parameter"><tt>start_index</tt></i> and
<i class="parameter"><tt>end_index</tt></i>. The value of <i class="parameter"><tt>scale</tt></i>
can also be one of the following pre-defined values:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">pango.SCALE_XX_SMALL</tt></span></td><td>0.5787037037037 - the scale factor for three shrinking
steps (1 / (1.2 * 1.2 * 1.2)).</td></tr><tr><td><span class="term"><tt class="literal">pango.SCALE_X_SMALL</tt></span></td><td>0.6444444444444 - the scale factor for two shrinking
steps (1 / (1.2 * 1.2)).</td></tr><tr><td><span class="term"><tt class="literal">pango.SCALE_SMALL</tt></span></td><td>0.8333333333333 - the scale factor for one shrinking
step (1 / 1.2).</td></tr><tr><td><span class="term"><tt class="literal">pango.SCALE_MEDIUM</tt></span></td><td>1.0 - The scale factor for normal size.</td></tr><tr><td><span class="term"><tt class="literal">pango.SCALE_LARGE</tt></span></td><td>1.2 - the scale factor for one magnification
step.</td></tr><tr><td><span class="term"><tt class="literal">pango.SCALE_X_LARGE</tt></span></td><td>1.4399999999999 - the scale factor for two
magnification steps (1.2 * 1.2).</td></tr><tr><td><span class="term"><tt class="literal">pango.SCALE_XX_LARGE</tt></span></td><td>1.728 - the scale factor for three magnification steps
(1.2 * 1.2 * 1.2).</td></tr></tbody></table><p></p></div><div class="refsect2" lang="en"><a name="function-pango--attrfallback"></a><h3>pango.AttrFallback</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pango.AttrFallback</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>fallback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_index</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_index</tt></b></span><span class="initializer">=1</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>fallback</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>, we should fall back
	  on other fonts for characters the active font is
	  missing.</td></tr><tr><td><span class="term"><b class="parameter"><tt>start_index</tt></b>:</span></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_index</tt></b>:</span></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.4 and above.</p></div><p>The <tt class="function">AttrFallback</tt>() function creates a new
<a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>
object of the type <tt class="literal">pango.ATTR_FALLBACK</tt>. If fallback is
<tt class="literal">TRUE</tt> other fonts on the system can be used to provide
characters missing from the current font. Otherwise, only characters from
the closest matching font can be used.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pango-class-reference.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-pangoattriterator.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The pango Class Reference</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">pango.AttrIterator</td></tr></table></div></body></html>