File: pango-constants.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 (85 lines) | stat: -rw-r--r-- 22,245 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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>pango Constants</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-functions.html" title="pango Functions"><link rel="next" href="pygtk-ref-changelog.html" title="AppendixA.ChangeLog"></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 Constants</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pango-functions.html">Prev</a></td><th width="60%" align="center">The pango Class Reference</th><td width="20%" align="right"><a accesskey="n" href="pygtk-ref-changelog.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="pango-constants"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>pango Constants</h2><p>pango Constants &#8212; the built-in constants of the pango module</p></div><div class="refsect1" lang="en"><a name="id2968619"></a><h2>Synopsis</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
<a href="pango-constants.html#pango-alignment-constants">Pango Alignment Constants</a>
<a href="pango-constants.html#pango-attribute-type-constants">Pango Attribute Type Constants</a>
<a href="pango-constants.html#pango-coverage-level-constants">Pango Coverage Level Constants</a>
<a href="pango-constants.html#pango-direction-constants">Pango Direction Constants</a>
<a href="pango-constants.html#pango-ellipsize-mode-constants">Pango Ellipsize Mode Constants</a>
<a href="pango-constants.html#pango-font-mask-constants">Pango Font Mask Flag Constants</a>
<a href="pango-constants.html#pango-scale-constants">Pango Scale Constants</a>
<a href="pango-constants.html#pango-stretch-constants">Pango Stretch Constants</a>
<a href="pango-constants.html#pango-style-constants">Pango Style Constants</a>
<a href="pango-constants.html#pango-tab-constants">Pango Tab Constants</a>
<a href="pango-constants.html#pango-underline-constants">Pango Underline Constants</a>
<a href="pango-constants.html#pango-variant-constants">Pango Variant Constants</a>
<a href="pango-constants.html#pango-weight-constants">Pango Weight Constants</a>
<a href="pango-constants.html#pango-wrap-mode-constants">Pango Wrap Mode Constants</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="pango-constants-description"></a><h2>Description</h2><div class="refsect2" lang="en"><a name="pango-alignment-constants"></a><h3>Pango Alignment Constants</h3><p>The Alignment constants specify how to align the lines of a
<a href="class-pangolayout.html" title="pango.Layout"><tt class="classname">pango.Layout</tt></a>
within the available space. If the <a href="class-pangolayout.html" title="pango.Layout"><tt class="classname">pango.Layout</tt></a> is
set to justify using the <a href="class-pangolayout.html#method-pangolayout--set-justify" title="pango.Layout.set_justify"><tt class="methodname">pango.Layout.set_justify</tt>()</a>
method, then this only has an effect for partial lines.</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.ALIGN_LEFT</tt></span></td><td>Put all available space on the right</td></tr><tr><td><span class="term"><tt class="literal">pango.ALIGN_CENTER</tt></span></td><td>Center the line within the available space</td></tr><tr><td><span class="term"><tt class="literal">pango.ALIGN_RIGHT</tt></span></td><td>Put all available space on the left</td></tr></tbody></table></div><div class="refsect2" lang="en"><a name="pango-attribute-type-constants"></a><h3>Pango Attribute Type Constants</h3><p>The Attribute Type constants specify the type of a <a href="class-pangoattribute.html" title="pango.Attribute"><tt class="classname">pango.Attribute</tt></a>.Along
with the predefined values, it is possible to allocate additional values for
custom attributes using 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. The predefined values are given below. The type of structure used
to store the attribute is listed in parentheses after the
description.</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></div><div class="refsect2" lang="en"><a name="pango-coverage-level-constants"></a><h3>Pango Coverage Level Constants</h3><p></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.COVERAGE_NONE</tt></span></td><td>The character is not representable with the
	    font.</td></tr><tr><td><span class="term"><tt class="literal">pango.COVERAGE_FALLBACK</tt></span></td><td>The character is represented in a way that may be
	    comprehensible but is not the correct graphical form. For
	    instance, a Hangul character represented as a a sequence of
	    Jamos, or a Latin transliteration of a Cyrillic word.</td></tr><tr><td><span class="term"><tt class="literal">pango.COVERAGE_APPROXIMATE</tt></span></td><td>The character is represented as basically the correct
	    graphical form, but with a stylistic variant inappropriate for
	    the current script.</td></tr><tr><td><span class="term"><tt class="literal">pango.COVERAGE_EXACT</tt></span></td><td>The character is represented as the correct graphical
	    form.</td></tr></tbody></table></div><div class="refsect2" lang="en"><a name="pango-direction-constants"></a><h3>Pango Direction Constants</h3><p>The pango Direction constants specify a direction in the Unicode
bidirectional algorithm. Not every value in this enumeration makes sense for
every usage of pango Direction.</p><p>The <tt class="literal">pango.DIRECTION_TTB_LTR</tt>,
<tt class="literal">pango.DIRECTION_TTB_RTL</tt> values come from an earlier
interpretation of this enumeration as the writing direction of a block of
text and are no longer used; See the Text module of the CSS3 spec for how
vertical text is planned to be handled in a future version of Pango. The
explanation of why <tt class="literal">pango.DIRECTION_TTB_LTR</tt> is treated as
<tt class="literal">pango.DIRECTION_RTL</tt> can be found there as well.</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.DIRECTION_LTR</tt></span></td><td>A strong left-to-right direction</td></tr><tr><td><span class="term"><tt class="literal">pango.DIRECTION_RTL</tt></span></td><td>A strong right-to-left direction</td></tr><tr><td><span class="term"><tt class="literal">pango.DIRECTION_TTB_LTR</tt></span></td><td>Deprecated value; treated the same as
	    <tt class="literal">pango.DIRECTION_RTL</tt>.</td></tr><tr><td><span class="term"><tt class="literal">pango.DIRECTION_TTB_RTL</tt></span></td><td>Deprecated value; treated the same as
	    <tt class="literal">pango.DIRECTION_LTR</tt></td></tr><tr><td><span class="term"><tt class="literal">pango.DIRECTION_WEAK_LTR</tt></span></td><td>A weak left-to-right direction</td></tr><tr><td><span class="term"><tt class="literal">pango.DIRECTION_WEAK_RTL</tt></span></td><td>A weak right-to-left direction</td></tr><tr><td><span class="term"><tt class="literal">pango.DIRECTION_NEUTRAL</tt></span></td><td>No direction specified</td></tr></tbody></table></div><div class="refsect2" lang="en"><a name="pango-ellipsize-mode-constants"></a><h3>Pango Ellipsize Mode Constants</h3><p>The Ellipsize Mode constants specify what sort of (if any)
ellipsization should be applied to a line of text. In the ellipsization
process characters are removed from the text in order to make it fit to a
given width and replaced with an ellipsis (...).</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.ELLIPSIZE_NONE</tt></span></td><td> No ellipsization.</td></tr><tr><td><span class="term"><tt class="literal">pango.ELLIPSIZE_START</tt></span></td><td>Omit characters at the start of the text.</td></tr><tr><td><span class="term"><tt class="literal">pango.ELLIPSIZE_MIDDLE</tt></span></td><td> Omit characters in the middle of the text.</td></tr><tr><td><span class="term"><tt class="literal">pango.ELLIPSIZE_END</tt></span></td><td> Omit characters at the end of the text.</td></tr></tbody></table></div><div class="refsect2" lang="en"><a name="pango-font-mask-constants"></a><h3>Pango Font Mask Flag Constants</h3><p>The Font Mask flag constants are bit-flags that correspond to
fields in a <a href="class-pangofontdescription.html" title="pango.FontDescription"><tt class="classname">pango.FontDescription</tt></a>
that have been set.</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.FONT_MASK_FAMILY</tt></span></td><td>the font family is specified.</td></tr><tr><td><span class="term"><tt class="literal">pango.FONT_MASK_STYLE</tt></span></td><td>the font style is specified.</td></tr><tr><td><span class="term"><tt class="literal">pango.FONT_MASK_VARIANT</tt></span></td><td>the font variant is specified.</td></tr><tr><td><span class="term"><tt class="literal">pango.FONT_MASK_WEIGHT</tt></span></td><td>the font weight is specified.</td></tr><tr><td><span class="term"><tt class="literal">pango.FONT_MASK_STRETCH</tt></span></td><td>the font stretch is specified.</td></tr><tr><td><span class="term"><tt class="literal">pango.FONT_MASK_SIZE</tt></span></td><td>the font size is specified.</td></tr></tbody></table></div><div class="refsect2" lang="en"><a name="pango-scale-constants"></a><h3>Pango Scale Constants</h3><p></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</tt></span></td><td>The <tt class="literal">pango.SCALE</tt> constant represents
	    the scale between dimensions used for Pango distances and device
	    units. (The definition of device units is dependent on the
	    output device; it will typically be pixels for a screen, and
	    points for a printer.) <tt class="literal">pango.SCALE</tt> is
	    currently 1024, but this may be changed in the future. When
	    setting font sizes, device units are always considered to be
	    points (as in "12 point font"), rather than pixels.</td></tr><tr><td><span class="term"><tt class="literal">pango.SCALE_XX_SMALL</tt></span></td><td>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>he 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>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>The scale factor for normal size (1.0).</td></tr><tr><td><span class="term"><tt class="literal">pango.SCALE_LARGE</tt></span></td><td>The scale factor for one magnification step
(1.2).</td></tr><tr><td><span class="term"><tt class="literal">pango.SCALE_X_LARGE</tt></span></td><td>he 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>The scale factor for three magnification steps
(1.2 * 1.2 * 1.2).</td></tr></tbody></table></div><div class="refsect2" lang="en"><a name="pango-stretch-constants"></a><h3>Pango Stretch Constants</h3><p>The Stretch constants specify the width of the font relative to
other designs within a family.</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></div><div class="refsect2" lang="en"><a name="pango-style-constants"></a><h3>Pango Style Constants</h3><p>The Style constants specify the various slant styles possible
for a font.</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></div><div class="refsect2" lang="en"><a name="pango-tab-constants"></a><h3>Pango Tab Constants</h3><p>The Tab constants specify where a tab stop appears relative to
the text.</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.TAB_LEFT</tt></span></td><td>the tab stop appears to the left of the text.</td></tr></tbody></table></div><div class="refsect2" lang="en"><a name="pango-underline-constants"></a><h3>Pango Underline Constants</h3><p>The Underline constants specify he type of underlining (if any)
to be used.</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></div><div class="refsect2" lang="en"><a name="pango-variant-constants"></a><h3>Pango Variant Constants</h3><p>The Variant constants specify the capitalization variant of the
font.</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></div><div class="refsect2" lang="en"><a name="pango-weight-constants"></a><h3>Pango Weight Constants</h3><p>The Weight constants specify the weight (boldness) of a
font. This is a numerical value ranging from 100 to 900, but there are some
predefined 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.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></div><div class="refsect2" lang="en"><a name="pango-wrap-mode-constants"></a><h3>Pango Wrap Mode Constants</h3><p>The Wrap Mode constants specify how to wrap the lines of a <a href="class-pangolayout.html" title="pango.Layout"><tt class="classname">pango.Layout</tt></a> to
the desired width.</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.WRAP_WORD</tt></span></td><td>wrap lines at word boundaries.</td></tr><tr><td><span class="term"><tt class="literal">pango.WRAP_CHAR</tt></span></td><td>wrap lines at character boundaries.</td></tr><tr><td><span class="term"><tt class="literal">pango.WRAP_WORD_CHAR</tt></span></td><td>wrap lines at word boundaries, but fall back to
	    character boundaries if there is not enough space for a full
	    word.</td></tr></tbody></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pango-functions.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="pygtk-ref-changelog.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">pango Functions</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">AppendixA.ChangeLog</td></tr></table></div></body></html>