/usr/share/gtk-doc/html/pygtk/class-pangoattribute.html is in python-gtk2-doc 2.24.0-4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 206 207 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>pango.Attribute</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><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="prev" 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" title="pango.Attribute"><a name="class-pangoattribute"></a><div class="titlepage"></div><div class="refnamediv"><h2>pango.Attribute</h2><p>pango.Attribute — an attribute that applies to a section of text</p></div><div class="refsect1" title="Synopsis"><a name="id3362395"></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 class="link" href="class-pangoattribute.html#method-pangoattribute--copy" title="pango.Attribute.copy">copy</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
<span class="bold"><strong>Functions</strong></span>
<code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrlanguage" title="pango.AttrLanguage">pango.AttrLanguage</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>language</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrfamily" title="pango.AttrFamily">pango.AttrFamily</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>family</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrforeground" title="pango.AttrForeground">pango.AttrForeground</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>red</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>green</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>blue</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrbackground" title="pango.AttrBackground">pango.AttrBackground</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>red</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>green</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>blue</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrsize" title="pango.AttrSize">pango.AttrSize</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrstyle" title="pango.AttrStyle">pango.AttrStyle</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>style</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrweight" title="pango.AttrWeight">pango.AttrWeight</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>weight</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrvariant" title="pango.AttrVariant">pango.AttrVariant</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>variant</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrstretch" title="pango.AttrStretch">pango.AttrStretch</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stretch</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrfontdesc" title="pango.AttrFontDesc">pango.AttrFontDesc</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>desc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrunderline" title="pango.AttrUnderline">pango.AttrUnderline</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>underline</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrstrikethrough" title="pango.AttrStrikethrough">pango.AttrStrikethrough</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>strikethrough</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrrise" title="pango.AttrRise">pango.AttrRise</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>rise</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrshape" title="pango.AttrShape">pango.AttrShape</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>ink_rect</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>logical_rect</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrscale" title="pango.AttrScale">pango.AttrScale</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>scale</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrfallback" title="pango.AttrFallback">pango.AttrFallback</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fallback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrsize" title="pango.AttrSize">pango.AttrSizeAbsolute</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrforeground" title="pango.AttrForeground">pango.AttrUnderlineColor</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>red</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>green</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>blue</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrforeground" title="pango.AttrForeground">pango.AttrStrikethroughColor</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>red</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>green</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>blue</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangoattribute.html#function-pango--attrsize" title="pango.AttrSize">pango.AttrLetterSpacing</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>letter_spacing</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre></div><div class="refsect1" title="Attributes"><a name="id3442857"></a><h2>Attributes</h2><p>All <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></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 width="1in"><col width="1in"><col width="4in"></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 class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></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 width="1in"><col width="1in"><col width="1in"></colgroup><tbody><tr valign="top"><td valign="top">"value"</td><td valign="top">Read </td><td valign="top"><code class="literal">ATTR_LANGUAGE</code></td><td valign="top">The <a class="link" href="class-pangolanguage.html" title="pango.Language"><code class="classname">pango.Language</code></a>.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_FAMILY</code></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"><code class="literal">ATTR_STYLE</code></td><td valign="top">The font slant style. See the <a class="link" href="class-pangoattribute.html#function-pango--attrstyle" title="pango.AttrStyle"><code class="function">pango.AttrStyle</code>()</a>
function for more details.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_WEIGHT</code></td><td valign="top">The font weight. See the <a class="link" href="class-pangoattribute.html#function-pango--attrweight" title="pango.AttrWeight"><code class="function">pango.AttrWeight</code>()</a>
function for more detail.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_VARIANT</code></td><td valign="top">The font variant. See the <a class="link" href="class-pangoattribute.html#function-pango--attrvariant" title="pango.AttrVariant"><code class="function">pango.AttrVariant</code>()</a>
function for more detail.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_STRETCH</code></td><td valign="top">The font stretch. See the <a class="link" href="class-pangoattribute.html#function-pango--attrstretch" title="pango.AttrStretch"><code class="function">pango.AttrStretch</code>()</a>
function for more details.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_SIZE</code></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"><code class="literal">ATTR_FONT_DESC</code></td><td valign="top">The <a class="link" href="class-pangofontdescription.html" title="pango.FontDescription"><code class="classname">pango.FontDescription</code></a>
object.</td></tr><tr valign="top"><td valign="top">"color"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_FOREGROUND</code></td><td valign="top">The foreground <a class="link" href="class-pangocolor.html" title="pango.Color"><code class="classname">pango.Color</code></a>
object.</td></tr><tr valign="top"><td valign="top">"color"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_BACKGROUND</code></td><td valign="top">The background <a class="link" href="class-pangocolor.html" title="pango.Color"><code class="classname">pango.Color</code></a>
object.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_UNDERLINE</code></td><td valign="top">The underline style. See the <a class="link" href="class-pangoattribute.html#function-pango--attrunderline" title="pango.AttrUnderline"><code class="function">pango.AttrUnderline</code>()</a>
function for more details.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_STRIKETHROUGH</code></td><td valign="top"><code class="literal">True</code> if the text is struck
through.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_RISE</code></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"><code class="literal">ATTR_SHAPE</code></td><td valign="top">The 4-tuple specifying the ink rectangle. See the <a class="link" href="class-pangoattribute.html#function-pango--attrshape" title="pango.AttrShape"><code class="function">pango.AttrShape</code>()</a>
function for more details.</td></tr><tr valign="top"><td valign="top">"logical_rect"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_SHAPE</code></td><td valign="top">The 4-tuple specifying the logical rectangle. See the
<a class="link" href="class-pangoattribute.html#function-pango--attrshape" title="pango.AttrShape"><code class="function">pango.AttrShape</code>()</a>
function for more details.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_SCALE</code></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"><code class="literal">ATTR_FALLBACK</code></td><td valign="top"><code class="literal">True</code> if font fallback is
enabled.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_LETTER_SPACING</code></td><td valign="top">The extra space between graphemes.</td></tr><tr valign="top"><td valign="top">"color"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_UNDERLINE_COLOR</code></td><td valign="top">The <a class="link" href="class-pangocolor.html" title="pango.Color"><code class="classname">pango.Color</code></a>
object used for the color of the underline.</td></tr><tr valign="top"><td valign="top">"color"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_STRIKETHROUGH_COLOR</code></td><td valign="top">The <a class="link" href="class-pangocolor.html" title="pango.Color"><code class="classname">pango.Color</code></a>
object used for the color of the strikethrough.</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read</td><td valign="top"><code class="literal">ATTR_ABSOLUTE_SIZE</code></td><td valign="top">The font size in device units.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id3133899"></a><h2>Description</h2><p>The <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></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><p><span class="term"><code class="literal">pango.ATTR_LANGUAGE</code></span></p></td><td>Specifies a <a class="link" href="class-pangolanguage.html" title="pango.Language"><code class="classname">pango.Language</code></a>.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_FAMILY</code></span></p></td><td>Specifies a font family name list as a string.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_STYLE</code></span></p></td><td>Specifies a font slant style. See the <a class="link" href="class-pangoattribute.html#function-pango--attrstyle" title="pango.AttrStyle"><code class="function">pango.AttrStyle</code>()</a>
function for more details.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_WEIGHT</code></span></p></td><td>Specifies a font weight. See the <a class="link" href="class-pangoattribute.html#function-pango--attrweight" title="pango.AttrWeight"><code class="function">pango.AttrWeight</code>()</a>
function for more detail.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_VARIANT</code></span></p></td><td>Specifies a font variant (normal or small caps). See the
<a class="link" href="class-pangoattribute.html#function-pango--attrvariant" title="pango.AttrVariant"><code class="function">pango.AttrVariant</code>()</a>
function for more detail.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_STRETCH</code></span></p></td><td>Specifies a font stretch. See the <a class="link" href="class-pangoattribute.html#function-pango--attrstretch" title="pango.AttrStretch"><code class="function">pango.AttrStretch</code>()</a>
function for more details.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_SIZE</code></span></p></td><td>Specifies a font size in thousandths of a point.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_FONT_DESC</code></span></p></td><td>Specifies a <a class="link" href="class-pangofontdescription.html" title="pango.FontDescription"><code class="classname">pango.FontDescription</code></a>.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_FOREGROUND</code></span></p></td><td>Specifies a foreground <a class="link" href="class-pangocolor.html" title="pango.Color"><code class="classname">pango.Color</code></a>.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_BACKGROUND</code></span></p></td><td>Specifies a background <a class="link" href="class-pangocolor.html" title="pango.Color"><code class="classname">pango.Color</code></a>.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_UNDERLINE</code></span></p></td><td>Specifies an underline style. See the <a class="link" href="class-pangoattribute.html#function-pango--attrunderline" title="pango.AttrUnderline"><code class="function">pango.AttrUnderline</code>()</a>
function for more details.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_STRIKETHROUGH</code></span></p></td><td>If <code class="literal">True</code> the text is struck
through.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_RISE</code></span></p></td><td>Specifies the displacement of the text from the
baseline.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_SHAPE</code></span></p></td><td>Specifies a shape. See the <a class="link" href="class-pangoattribute.html#function-pango--attrshape" title="pango.AttrShape"><code class="function">pango.AttrShape</code>()</a>
function for more details.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_SCALE</code></span></p></td><td>Specifies a font size scale factor.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_FALLBACK</code></span></p></td><td>if <code class="literal">True</code>, fallback to other fonts is
enabled.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_LETTER_SPACING</code></span></p></td><td>Specifies the extra space between graphemes.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_UNDERLINE_COLOR</code></span></p></td><td>Specifies the color of the underline.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_STRIKETHROUGH_COLOR</code></span></p></td><td>Specifies the color of the strikethrough.</td></tr><tr><td><p><span class="term"><code class="literal">pango.ATTR_ABSOLUTE_SIZE</code></span></p></td><td>Specifies the font size in device units.</td></tr></tbody></table><p>Additional attribute types can be registered with the <a class="link" href="class-pangoattribute.html#function-pango--attr-type-register" title="pango.attr_type_register"><code class="function">pango.attr_type_register</code>()</a>
function.</p></div><div class="refsect1" title="Methods"><a name="id3441095"></a><h2>Methods</h2><div class="refsect2" title="pango.Attribute.copy"><a name="method-pangoattribute--copy"></a><h3>pango.Attribute.copy</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object</td></tr></tbody></table><p>The <code class="methodname">copy</code>() method returns a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object that is a copy of this attribute.</p></div></div><div class="refsect1" title="Functions"><a name="id2840775"></a><h2>Functions</h2><div class="refsect2" title="pango.attr_type_register"><a name="function-pango--attr-type-register"></a><h3>pango.attr_type_register</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.attr_type_register</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>a name for the type. (Currently not
used.)</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the new attribute type ID
integer.</td></tr></tbody></table><p>The <code class="function">attr_type_register</code>() function returns a
new attribute type ID integer value.</p></div><div class="refsect2" title="pango.AttrLanguage"><a name="function-pango--attrlanguage"></a><h3>pango.AttrLanguage</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrLanguage</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>language</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>language</code></strong> :</span></p></td><td>a <a class="link" href="class-pangolanguage.html" title="pango.Language"><code class="classname">pango.Language</code></a>
object.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object.</td></tr></tbody></table><p>The <code class="function">AttrLanguage</code>() function creates a new
<a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object of the type <code class="literal">pango.ATTR_LANGUAGE</code> with the <a class="link" href="class-pangolanguage.html" title="pango.Language"><code class="classname">pango.Language</code></a>
specified by <em class="parameter"><code>language</code></em> and the text range specified by
<em class="parameter"><code>start_index</code></em> and
<em class="parameter"><code>end_index</code></em>.</p></div><div class="refsect2" title="pango.AttrFamily"><a name="function-pango--attrfamily"></a><h3>pango.AttrFamily</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrFamily</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>family</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>family</code></strong> :</span></p></td><td>the string containing a font family name
list.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object.</td></tr></tbody></table><p>The <code class="function">AttrFamily</code>() function creates a new
<a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object of the type <code class="literal">pango.ATTR_FAMILY</code> with the font family
name list specified by the string <em class="parameter"><code>family</code></em> and the text
range specified by <em class="parameter"><code>start_index</code></em> and
<em class="parameter"><code>end_index</code></em>.</p></div><div class="refsect2" title="pango.AttrForeground"><a name="function-pango--attrforeground"></a><h3>pango.AttrForeground</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrForeground</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>red</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>green</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>blue</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>red</code></strong> :</span></p></td><td>the red component of the color in the range 0
to 65535.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>green</code></strong> :</span></p></td><td>the green component of the color in the range 0
to 65535.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>blue</code></strong> :</span></p></td><td>the blue component of the color in the range 0
to 65535.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object.</td></tr></tbody></table><p>The <code class="function">AttrForeground</code>() function creates a new
<a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
of the type <code class="literal">pango.ATTR_FOREGROUND</code> with the RGB color
specified by <em class="parameter"><code>red</code></em>, <em class="parameter"><code>green</code></em> and
<em class="parameter"><code>blue</code></em> and the text range specified by
<em class="parameter"><code>start_index</code></em> and
<em class="parameter"><code>end_index</code></em>.</p></div><div class="refsect2" title="pango.AttrBackground"><a name="function-pango--attrbackground"></a><h3>pango.AttrBackground</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrBackground</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>red</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>green</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>blue</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>red</code></strong> :</span></p></td><td>the red component of the color in the range 0
to 65535.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>green</code></strong> :</span></p></td><td>the green component of the color in the range 0
to 65535.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>blue</code></strong> :</span></p></td><td>the blue component of the color in the range 0
to 65535.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object.</td></tr></tbody></table><p>The <code class="function">AttrBackground</code>() function creates a new
pangoAttribute of the type <code class="literal">pango.ATTR_BACKGROUND</code> with the
RGB color specified by <em class="parameter"><code>red</code></em>,
<em class="parameter"><code>green</code></em> and <em class="parameter"><code>blue</code></em> and the text
range specified by <em class="parameter"><code>start_index</code></em> and
<em class="parameter"><code>end_index</code></em>.</p></div><div class="refsect2" title="pango.AttrSize"><a name="function-pango--attrsize"></a><h3>pango.AttrSize</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrSize</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>size</code></strong> :</span></p></td><td>the font size in thousandths of a
point.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object</td></tr></tbody></table><p>The <code class="function">AttrSize</code>() function creates a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object of the type <code class="literal">pango.ATTR_SIZE</code> with the font size
specified by <em class="parameter"><code>size</code></em> and the text range specified by
<em class="parameter"><code>start_index</code></em> and
<em class="parameter"><code>end_index</code></em>.</p></div><div class="refsect2" title="pango.AttrStyle"><a name="function-pango--attrstyle"></a><h3>pango.AttrStyle</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrStyle</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>style</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>style</code></strong> :</span></p></td><td>the font slant style.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object</td></tr></tbody></table><p>The <code class="function">AttrStyle</code>() function creates a new
<a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object of the type <code class="literal">pango.ATTR_STYLE</code> with the font slant
style specified by <em class="parameter"><code>style</code></em> and the text range specified
by <em class="parameter"><code>start_index</code></em> and <em class="parameter"><code>end_index</code></em>.
The value of <em class="parameter"><code>style</code></em> must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">pango.STYLE_NORMAL</code></span></p></td><td>The font is upright.</td></tr><tr><td><p><span class="term"><code class="literal">pango.STYLE_OBLIQUE</code></span></p></td><td>The font is slanted in a roman style.</td></tr><tr><td><p><span class="term"><code class="literal">pango.STYLE_ITALIC</code></span></p></td><td>The font is slanted in an italic style.</td></tr></tbody></table><p></p></div><div class="refsect2" title="pango.AttrWeight"><a name="function-pango--attrweight"></a><h3>pango.AttrWeight</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrWeight</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>weight</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>weight</code></strong> :</span></p></td><td>the font weight.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object</td></tr></tbody></table><p>The <code class="function">AttrWeight</code>() function creates a new
<a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object of the type <code class="literal">pango.ATTR_WEIGHT</code> with the font weight
specified by <em class="parameter"><code>weight</code></em> and the text range specified by
<em class="parameter"><code>start_index</code></em> and <em class="parameter"><code>end_index</code></em>. The
value of <em class="parameter"><code>style</code></em> must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">pango.WEIGHT_ULTRALIGHT</code></span></p></td><td>The ultralight weight (= 200).</td></tr><tr><td><p><span class="term"><code class="literal">pango.WEIGHT_LIGHT</code></span></p></td><td>The light weight (=300).</td></tr><tr><td><p><span class="term"><code class="literal">pango.WEIGHT_NORMAL</code></span></p></td><td>The default weight (= 400).</td></tr><tr><td><p><span class="term"><code class="literal">pango.WEIGHT_BOLD</code></span></p></td><td>The bold weight (= 700).</td></tr><tr><td><p><span class="term"><code class="literal">pango.WEIGHT_ULTRABOLD</code></span></p></td><td>The ultrabold weight (= 800).</td></tr><tr><td><p><span class="term"><code class="literal">pango.WEIGHT_HEAVY</code></span></p></td><td>The heavy weight (= 900).</td></tr></tbody></table><p></p></div><div class="refsect2" title="pango.AttrVariant"><a name="function-pango--attrvariant"></a><h3>pango.AttrVariant</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrVariant</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>variant</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>variant</code></strong> :</span></p></td><td>the font variant.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object</td></tr></tbody></table><p>The <code class="function">AttrVariant</code>() function creates a new
<a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object of the type <code class="literal">pango.ATTR_VARIANT</code> with the font
variant specified by <em class="parameter"><code>variant</code></em> and the text range
specified by <em class="parameter"><code>start_index</code></em> and
<em class="parameter"><code>end_index</code></em>. The value of
<em class="parameter"><code>variant</code></em> must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">pango.VARIANT_NORMAL</code></span></p></td><td>A normal font.</td></tr><tr><td><p><span class="term"><code class="literal">pango.VARIANT_SMALL_CAPS</code></span></p></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" title="pango.AttrStretch"><a name="function-pango--attrstretch"></a><h3>pango.AttrStretch</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrStretch</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stretch</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>stretch</code></strong> :</span></p></td><td>the font stretch style.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object</td></tr></tbody></table><p>The <code class="function">AttrStretch</code>() function creates a new
<a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object of the type <code class="literal">pango.ATTR_STRETCH</code> with the font
stretch style specified by <em class="parameter"><code>stretch</code></em> and the text range
specified by <em class="parameter"><code>start_index</code></em> and
<em class="parameter"><code>end_index</code></em>. The value of
<em class="parameter"><code>stretch</code></em> must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">pango.STRETCH_ULTRA_CONDENSED</code></span></p></td><td>The most narrow width</td></tr><tr><td><p><span class="term"><code class="literal">pango.STRETCH_EXTRA_CONDENSED</code></span></p></td><td></td></tr><tr><td><p><span class="term"><code class="literal">pango.STRETCH_CONDENSED</code></span></p></td><td></td></tr><tr><td><p><span class="term"><code class="literal">pango.STRETCH_SEMI_CONDENSED</code></span></p></td><td></td></tr><tr><td><p><span class="term"><code class="literal">pango.STRETCH_NORMAL</code></span></p></td><td>The normal width.</td></tr><tr><td><p><span class="term"><code class="literal">pango.STRETCH_SEMI_EXPANDED</code></span></p></td><td></td></tr><tr><td><p><span class="term"><code class="literal">pango.STRETCH_EXPANDED</code></span></p></td><td></td></tr><tr><td><p><span class="term"><code class="literal">pango.STRETCH_EXTRA_EXPANDED</code></span></p></td><td></td></tr><tr><td><p><span class="term"><code class="literal">pango.STRETCH_ULTRA_EXPANDED</code></span></p></td><td>The most expanded width</td></tr></tbody></table><p></p></div><div class="refsect2" title="pango.AttrFontDesc"><a name="function-pango--attrfontdesc"></a><h3>pango.AttrFontDesc</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrFontDesc</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>desc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>desc</code></strong> :</span></p></td><td>a <a class="link" href="class-pangofontdescription.html" title="pango.FontDescription"><code class="classname">pango.FontDescription</code></a>
object.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object</td></tr></tbody></table><p>The <code class="function">AttrFontDesc</code>() function creates a new
<a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object of the type <code class="literal">pango.ATTR_FONT_DESC</code> with the <a class="link" href="class-pangofontdescription.html" title="pango.FontDescription"><code class="classname">pango.FontDescription</code></a>
specified by <em class="parameter"><code>desc</code></em> and the text range specified by
<em class="parameter"><code>start_index</code></em> and
<em class="parameter"><code>end_index</code></em>.</p></div><div class="refsect2" title="pango.AttrUnderline"><a name="function-pango--attrunderline"></a><h3>pango.AttrUnderline</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrUnderline</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>underline</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>underline</code></strong> :</span></p></td><td>the underline style.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object</td></tr></tbody></table><p>The <code class="function">AttrUnderline</code>() function creates a new
<a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object of the type <code class="literal">pango.ATTR_UNDERLINE</code> with the
underline style specified by <em class="parameter"><code>underline</code></em> and the text
range specified by <em class="parameter"><code>start_index</code></em> and
<em class="parameter"><code>end_index</code></em>. The value of
<em class="parameter"><code>underline</code></em> must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">pango.UNDERLINE_NONE</code></span></p></td><td>No underline should be drawn.</td></tr><tr><td><p><span class="term"><code class="literal">pango.UNDERLINE_SINGLE</code></span></p></td><td>A single underline should be drawn.</td></tr><tr><td><p><span class="term"><code class="literal">pango.UNDERLINE_DOUBLE</code></span></p></td><td>A double underline should be drawn.</td></tr><tr><td><p><span class="term"><code class="literal">pango.UNDERLINE_LOW</code></span></p></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.
<code class="literal">pango.UNDERLINE_SINGLE</code> should be used for extended
portions of text.</td></tr></tbody></table><p></p></div><div class="refsect2" title="pango.AttrStrikethrough"><a name="function-pango--attrstrikethrough"></a><h3>pango.AttrStrikethrough</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrStrikethrough</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>strikethrough</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>strikethrough</code></strong> :</span></p></td><td>if <code class="literal">True</code> the text should be
struck through.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object</td></tr></tbody></table><p>The <code class="function">AttrStrikethrough</code>() function creates a
new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object of the type <code class="literal">pango.ATTR_STRIKETHROUGH</code> with the
value specified by <em class="parameter"><code>strikethrough</code></em> and the text range
specified by <em class="parameter"><code>start_index</code></em> and
<em class="parameter"><code>end_index</code></em>. If strikethough is <code class="literal">True</code>
the text should be struck through.</p></div><div class="refsect2" title="pango.AttrRise"><a name="function-pango--attrrise"></a><h3>pango.AttrRise</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrRise</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>rise</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>rise</code></strong> :</span></p></td><td>the displacement of the text from the
baseline.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object</td></tr></tbody></table><p>The <code class="function">AttrRise</code>() function creates a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object of the type <code class="literal">pango.ATTR_RISE</code> with the text
displacement from the baseline specified by <em class="parameter"><code>rise</code></em> and
the text range specified by <em class="parameter"><code>start_index</code></em> and
<em class="parameter"><code>end_index</code></em>.</p></div><div class="refsect2" title="pango.AttrShape"><a name="function-pango--attrshape"></a><h3>pango.AttrShape</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrShape</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>ink_rect</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>logical_rect</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>ink_rect</code></strong> :</span></p></td><td>the ink rectangle of the
shape.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>logical_rect</code></strong> :</span></p></td><td>the logical rectangle of the
shape.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object</td></tr></tbody></table><p>The <code class="function">AttrShape</code>() function creates a new
<a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object of the type <code class="literal">pango.ATTR_SHAPE</code> with the shape
rectangles specified by <em class="parameter"><code>ink_rect</code></em> and
<em class="parameter"><code>logical_rect</code></em> and the text range specified by
<em class="parameter"><code>start_index</code></em> and <em class="parameter"><code>end_index</code></em>. 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 class="link" href="class-pangolayout.html" title="pango.Layout"><code class="classname">pango.Layout</code></a>.</p></div><div class="refsect2" title="pango.AttrScale"><a name="function-pango--attrscale"></a><h3>pango.AttrScale</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrScale</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>scale</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>scale</code></strong> :</span></p></td><td>the font size scale factor as a
float.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object</td></tr></tbody></table><p>The <code class="function">AttrScale</code>() function creates a new
<a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object of the type <code class="literal">pango.ATTR_SCALE</code> with the font size
scale factor specified by <em class="parameter"><code>scale</code></em> and the text range
specified by <em class="parameter"><code>start_index</code></em> and
<em class="parameter"><code>end_index</code></em>. The value of <em class="parameter"><code>scale</code></em>
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><p><span class="term"><code class="literal">pango.SCALE_XX_SMALL</code></span></p></td><td>0.5787037037037 - the scale factor for three shrinking
steps (1 / (1.2 * 1.2 * 1.2)).</td></tr><tr><td><p><span class="term"><code class="literal">pango.SCALE_X_SMALL</code></span></p></td><td>0.6444444444444 - the scale factor for two shrinking
steps (1 / (1.2 * 1.2)).</td></tr><tr><td><p><span class="term"><code class="literal">pango.SCALE_SMALL</code></span></p></td><td>0.8333333333333 - the scale factor for one shrinking
step (1 / 1.2).</td></tr><tr><td><p><span class="term"><code class="literal">pango.SCALE_MEDIUM</code></span></p></td><td>1.0 - The scale factor for normal size.</td></tr><tr><td><p><span class="term"><code class="literal">pango.SCALE_LARGE</code></span></p></td><td>1.2 - the scale factor for one magnification
step.</td></tr><tr><td><p><span class="term"><code class="literal">pango.SCALE_X_LARGE</code></span></p></td><td>1.4399999999999 - the scale factor for two
magnification steps (1.2 * 1.2).</td></tr><tr><td><p><span class="term"><code class="literal">pango.SCALE_XX_LARGE</code></span></p></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" title="pango.AttrFallback"><a name="function-pango--attrfallback"></a><h3>pango.AttrFallback</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pango.AttrFallback</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fallback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_index</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_index</code></strong></span><span class="initializer">=1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>fallback</code></strong> :</span></p></td><td>if <code class="literal">True</code>, we should fall back
on other fonts for characters the active font is
missing.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_index</code></strong> :</span></p></td><td>the index of the start of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_index</code></strong> :</span></p></td><td>the index of the end of the attribute
application in the text.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object</td></tr></tbody></table><div class="note" title="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 <code class="function">AttrFallback</code>() function creates a new
<a class="link" href="class-pangoattribute.html" title="pango.Attribute"><code class="classname">pango.Attribute</code></a>
object of the type <code class="literal">pango.ATTR_FALLBACK</code>. If fallback is
<code class="literal">True</code> 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>
|