Enums

Details

class Pango.Alignment(value)

Bases: GObject.GEnum

PangoAlignment describes how to align the lines of a PangoLayout within the available space.

If the PangoLayout is set to justify using [method`Pango`.Layout.set_justify], this only affects partial lines.

See [method`Pango`.Layout.set_auto_dir] for how text direction affects the interpretation of PangoAlignment values.

LEFT = 0

Put all available space on the right

CENTER = 1

Center the line within the available space

RIGHT = 2

Put all available space on the left

class Pango.AttrType(value)

Bases: GObject.GEnum

The PangoAttrType distinguishes between different types of attributes.

Along with the predefined values, it is possible to allocate additional values for custom attributes using [func`AttrType`.register]. The predefined values are given below. The type of structure used to store the attribute is listed in parentheses after the description.

classmethod get_name(type)[source]
Parameters:

type (Pango.AttrType) – an attribute type ID to fetch the name for

Returns:

the type ID name (which may be None), or None if type is a built-in Pango attribute type or invalid.

Return type:

str or None

Fetches the attribute type name.

The attribute type name is the string passed in when registering the type using [func`Pango`.AttrType.register].

The returned value is an interned string (see GLib.intern_string() for what that means) that should not be modified or freed.

New in version 1.22.

classmethod register(name)[source]
Parameters:

name (str) – an identifier for the type

Returns:

the new type ID.

Return type:

Pango.AttrType

Allocate a new attribute type ID.

The attribute type name can be accessed later by using [func`Pango`.AttrType.get_name].

INVALID = 0

does not happen

LANGUAGE = 1

language ([struct`Pango`.AttrLanguage])

BACKGROUND = 10

background color ([struct`Pango`.AttrColor])

UNDERLINE = 11

whether the text has an underline ([struct`Pango`.AttrInt])

STRIKETHROUGH = 12

whether the text is struck-through ([struct`Pango`.AttrInt])

RISE = 13

baseline displacement ([struct`Pango`.AttrInt])

SHAPE = 14

shape ([struct`Pango`.AttrShape])

SCALE = 15

font size scale factor ([struct`Pango`.AttrFloat])

FALLBACK = 16

whether fallback is enabled ([struct`Pango`.AttrInt])

LETTER_SPACING = 17

letter spacing ([struct`PangoAttrInt`])

UNDERLINE_COLOR = 18

underline color ([struct`Pango`.AttrColor])

STRIKETHROUGH_COLOR = 19

strikethrough color ([struct`Pango`.AttrColor])

FAMILY = 2

font family name list ([struct`Pango`.AttrString])

ABSOLUTE_SIZE = 20

font size in pixels scaled by Pango.SCALE ([struct`Pango`.AttrInt])

GRAVITY = 21

base text gravity ([struct`Pango`.AttrInt])

GRAVITY_HINT = 22

gravity hint ([struct`Pango`.AttrInt])

FONT_FEATURES = 23

OpenType font features ([struct`Pango`.AttrFontFeatures]).

New in version 1.38.

FOREGROUND_ALPHA = 24

foreground alpha ([struct`Pango`.AttrInt]).

New in version 1.38.

BACKGROUND_ALPHA = 25

background alpha ([struct`Pango`.AttrInt]).

New in version 1.38.

ALLOW_BREAKS = 26

whether breaks are allowed ([struct`Pango`.AttrInt]).

New in version 1.44.

SHOW = 27

how to render invisible characters ([struct`Pango`.AttrInt]).

New in version 1.44.

INSERT_HYPHENS = 28

whether to insert hyphens at intra-word line breaks ([struct`Pango`.AttrInt]).

New in version 1.44.

OVERLINE = 29

whether the text has an overline ([struct`Pango`.AttrInt]).

New in version 1.46.

STYLE = 3

font slant style ([struct`Pango`.AttrInt])

OVERLINE_COLOR = 30

overline color ([struct`Pango`.AttrColor]).

New in version 1.46.

LINE_HEIGHT = 31

line height factor ([struct`Pango`.AttrFloat]).

New in version 1.50.

ABSOLUTE_LINE_HEIGHT = 32

line height ([struct`Pango`.AttrInt]).

New in version 1.50.

TEXT_TRANSFORM = 33
WORD = 34

override segmentation to classify the range of the attribute as a single word ([struct`Pango`.AttrInt]).

New in version 1.50.

SENTENCE = 35

override segmentation to classify the range of the attribute as a single sentence ([struct`Pango`.AttrInt]).

New in version 1.50.

BASELINE_SHIFT = 36

baseline displacement ([struct`Pango`.AttrInt]).

New in version 1.50.

FONT_SCALE = 37

font-relative size change ([struct`Pango`.AttrInt]).

New in version 1.50.

WEIGHT = 4

font weight ([struct`Pango`.AttrInt])

VARIANT = 5

font variant (normal or small caps) ([struct`Pango`.AttrInt])

STRETCH = 6

font stretch ([struct`Pango`.AttrInt])

SIZE = 7

font size in points scaled by Pango.SCALE ([struct`Pango`.AttrInt])

FONT_DESC = 8

font description ([struct`Pango`.AttrFontDesc])

FOREGROUND = 9

foreground color ([struct`Pango`.AttrColor])

class Pango.BaselineShift(value)

Bases: GObject.GEnum

An enumeration that affects baseline shifts between runs.

New in version 1.50.

NONE = 0

Leave the baseline unchanged

SUPERSCRIPT = 1

Shift the baseline to the superscript position, relative to the previous run

SUBSCRIPT = 2

Shift the baseline to the subscript position, relative to the previous run

class Pango.BidiType(value)

Bases: GObject.GEnum

PangoBidiType represents the bidirectional character type of a Unicode character.

The values in this enumeration are specified by the Unicode bidirectional algorithm.

New in version 1.22.

Deprecated since version 1.44: Use fribidi for this information

classmethod for_unichar(ch)[source]
Parameters:

ch (str) – a Unicode character

Returns:

the bidirectional character type, as used in the Unicode bidirectional algorithm.

Return type:

Pango.BidiType

Determines the bidirectional type of a character.

The bidirectional type is specified in the Unicode Character Database.

A simplified version of this function is available as [func`unichar_direction`].

New in version 1.22.

L = 0

Left-to-Right

LRE = 1

Left-to-Right Embedding

ET = 10

European Number Terminator

AN = 11

Arabic Number

CS = 12

Common Number Separator

NSM = 13

Nonspacing Mark

BN = 14

Boundary Neutral

B = 15

Paragraph Separator

S = 16

Segment Separator

WS = 17

Whitespace

ON = 18

Other Neutrals

LRI = 19

Left-to-Right isolate.

New in version 1.48.6.

LRO = 2

Left-to-Right Override

RLI = 20

Right-to-Left isolate.

New in version 1.48.6.

FSI = 21

First strong isolate.

New in version 1.48.6.

PDI = 22

Pop directional isolate.

New in version 1.48.6.

R = 3

Right-to-Left

AL = 4

Right-to-Left Arabic

RLE = 5

Right-to-Left Embedding

RLO = 6

Right-to-Left Override

PDF = 7

Pop Directional Format

EN = 8

European Number

ES = 9

European Number Separator

class Pango.CoverageLevel(value)

Bases: GObject.GEnum

PangoCoverageLevel is used to indicate how well a font can represent a particular Unicode character for a particular script.

Since 1.44, only Pango.CoverageLevel.NONE and Pango.CoverageLevel.EXACT will be returned.

NONE = 0

The character is not representable with the font.

FALLBACK = 1

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.

APPROXIMATE = 2

The character is represented as basically the correct graphical form, but with a stylistic variant inappropriate for the current script.

EXACT = 3

The character is represented as the correct graphical form.

class Pango.Direction(value)

Bases: GObject.GEnum

PangoDirection represents a direction in the Unicode bidirectional algorithm.

Not every value in this enumeration makes sense for every usage of PangoDirection; for example, the return value of [func`unichar_direction`] and [func`find_base_dir`] cannot be PANGO_DIRECTION_WEAK_LTR or PANGO_DIRECTION_WEAK_RTL, since every character is either neutral or has a strong direction; on the other hand PANGO_DIRECTION_NEUTRAL doesn’t make sense to pass to [func`itemize_with_base_dir`].

The PANGO_DIRECTION_TTB_LTR, PANGO_DIRECTION_TTB_RTL values come from an earlier interpretation of this enumeration as the writing direction of a block of text and are no longer used. See PangoGravity for how vertical text is handled in Pango.

If you are interested in text direction, you should really use fribidi directly. PangoDirection is only retained because it is used in some public apis.

LTR = 0

A strong left-to-right direction

RTL = 1

A strong right-to-left direction

TTB_LTR = 2

Deprecated value; treated the same as PANGO_DIRECTION_RTL.

TTB_RTL = 3

Deprecated value; treated the same as PANGO_DIRECTION_LTR

WEAK_LTR = 4

A weak left-to-right direction

WEAK_RTL = 5

A weak right-to-left direction

NEUTRAL = 6

No direction specified

class Pango.EllipsizeMode(value)

Bases: GObject.GEnum

PangoEllipsizeMode describes what sort of ellipsization should be applied to 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.

NONE = 0

No ellipsization

START = 1

Omit characters at the start of the text

MIDDLE = 2

Omit characters in the middle of the text

END = 3

Omit characters at the end of the text

class Pango.FontScale(value)

Bases: GObject.GEnum

An enumeration that affects font sizes for superscript and subscript positioning and for (emulated) Small Caps.

New in version 1.50.

NONE = 0

Leave the font size unchanged

SUPERSCRIPT = 1

Change the font to a size suitable for superscripts

SUBSCRIPT = 2

Change the font to a size suitable for subscripts

SMALL_CAPS = 3

Change the font to a size suitable for Small Caps

class Pango.Gravity(value)

Bases: GObject.GEnum

PangoGravity represents the orientation of glyphs in a segment of text.

This is useful when rendering vertical text layouts. In those situations, the layout is rotated using a non-identity [struct`Pango`.Matrix], and then glyph orientation is controlled using PangoGravity.

Not every value in this enumeration makes sense for every usage of PangoGravity; for example, Pango.Gravity.AUTO only can be passed to [method`Pango`.Context.set_base_gravity] and can only be returned by [method`Pango`.Context.get_base_gravity].

See also: [enum`Pango`.GravityHint]

New in version 1.16.

classmethod get_for_matrix(matrix)[source]
Parameters:

matrix (Pango.Matrix or None) – a PangoMatrix

Returns:

the gravity of matrix, which will never be Pango.Gravity.AUTO, or Pango.Gravity.SOUTH if matrix is None

Return type:

Pango.Gravity

Finds the gravity that best matches the rotation component in a PangoMatrix.

New in version 1.16.

classmethod get_for_script(script, base_gravity, hint)[source]
Parameters:
Returns:

resolved gravity suitable to use for a run of text with script

Return type:

Pango.Gravity

Returns the gravity to use in laying out a PangoItem.

The gravity is determined based on the script, base gravity, and hint.

If base_gravity is Pango.Gravity.AUTO, it is first replaced with the preferred gravity of script. To get the preferred gravity of a script, pass Pango.Gravity.AUTO and Pango.GravityHint.STRONG in.

New in version 1.16.

classmethod get_for_script_and_width(script, wide, base_gravity, hint)[source]
Parameters:
Returns:

resolved gravity suitable to use for a run of text with script and wide.

Return type:

Pango.Gravity

Returns the gravity to use in laying out a single character or PangoItem.

The gravity is determined based on the script, East Asian width, base gravity, and hint,

This function is similar to [func`Pango`.Gravity.get_for_script] except that this function makes a distinction between narrow/half-width and wide/full-width characters also. Wide/full-width characters always stand *upright*, that is, they always take the base gravity, whereas narrow/full-width characters are always rotated in vertical context.

If base_gravity is Pango.Gravity.AUTO, it is first replaced with the preferred gravity of script.

New in version 1.26.

classmethod to_rotation(gravity)[source]
Parameters:

gravity (Pango.Gravity) – gravity to query, should not be Pango.Gravity.AUTO

Returns:

the rotation value corresponding to gravity.

Return type:

float

Converts a PangoGravity value to its natural rotation in radians.

Note that [method`Pango`.Matrix.rotate] takes angle in degrees, not radians. So, to call [method`Pango`.Matrix,rotate] with the output of this function you should multiply it by (180. / GLib.PI).

New in version 1.16.

SOUTH = 0

Glyphs stand upright (default) <img align=”right” valign=”center” src=”m-south.png”>

EAST = 1

Glyphs are rotated 90 degrees counter-clockwise. <img align=”right” valign=”center” src=”m-east.png”>

NORTH = 2

Glyphs are upside-down. <img align=”right” valign=”cener” src=”m-north.png”>

WEST = 3

Glyphs are rotated 90 degrees clockwise. <img align=”right” valign=”center” src=”m-west.png”>

AUTO = 4

Gravity is resolved from the context matrix

class Pango.GravityHint(value)

Bases: GObject.GEnum

PangoGravityHint defines how horizontal scripts should behave in a vertical context.

That is, English excerpts in a vertical paragraph for example.

See also [enum`Pango`.Gravity]

New in version 1.16.

NATURAL = 0

scripts will take their natural gravity based on the base gravity and the script. This is the default.

STRONG = 1

always use the base gravity set, regardless of the script.

LINE = 2

for scripts not in their natural direction (eg. Latin in East gravity), choose per-script gravity such that every script respects the line progression. This means, Latin and Arabic will take opposite gravities and both flow top-to-bottom for example.

class Pango.LayoutDeserializeError(value)

Bases: GObject.GEnum

Errors that can be returned by [func`Pango`.Layout.deserialize].

New in version 1.50.

classmethod quark()[source]
Return type:

int

INVALID = 0

Unspecified error

INVALID_VALUE = 1

A JSon value could not be interpreted

MISSING_VALUE = 2

A required JSon member was not found

class Pango.Overline(value)

Bases: GObject.GEnum

The PangoOverline enumeration is used to specify whether text should be overlined, and if so, the type of line.

New in version 1.46.

NONE = 0

no overline should be drawn

SINGLE = 1

Draw a single line above the ink extents of the text being underlined.

class Pango.RenderPart(value)

Bases: GObject.GEnum

PangoRenderPart defines different items to render for such purposes as setting colors.

New in version 1.8.

FOREGROUND = 0

the text itself

BACKGROUND = 1

the area behind the text

UNDERLINE = 2

underlines

STRIKETHROUGH = 3

strikethrough lines

OVERLINE = 4

overlines

class Pango.Script(value)

Bases: GObject.GEnum

The PangoScript enumeration identifies different writing systems.

The values correspond to the names as defined in the Unicode standard. See Unicode Standard Annex 24: Script names

Note that this enumeration is deprecated and will not be updated to include values in newer versions of the Unicode standard. Applications should use the [enum`GLib`.UnicodeScript] enumeration instead, whose values are interchangeable with PangoScript.

classmethod for_unichar(ch)[source]
Parameters:

ch (str) – a Unicode character

Returns:

the PangoScript for the character.

Return type:

Pango.Script

Looks up the script for a particular character.

The script of a character is defined by Unicode Standard Annex 24: Script names.

No check is made for ch being a valid Unicode character; if you pass in invalid character, the result is undefined.

Note that while the return type of this function is declared as PangoScript, as of Pango 1.18, this function simply returns the return value of [func`GLib`.unichar_get_script]. Callers must be prepared to handle unknown values.

New in version 1.4.

Deprecated since version 1.44.: Use GLib.unichar_get_script()

classmethod get_sample_language(script)[source]
Parameters:

script (Pango.Script) – a PangoScript

Returns:

a PangoLanguage that is representative of the script

Return type:

Pango.Language or None

Finds a language tag that is reasonably representative of script.

The language will usually be the most widely spoken or used language written in that script: for instance, the sample language for Pango.Script.CYRILLIC is ru (Russian), the sample language for Pango.Script.ARABIC is ar.

For some scripts, no sample language will be returned because there is no language that is sufficiently representative. The best example of this is Pango.Script.HAN, where various different variants of written Chinese, Japanese, and Korean all use significantly different sets of Han characters and forms of shared characters. No sample language can be provided for many historical scripts as well.

As of 1.18, this function checks the environment variables PANGO_LANGUAGE and LANGUAGE (checked in that order) first. If one of them is set, it is parsed as a list of language tags separated by colons or other separators. This function will return the first language in the parsed list that Pango believes may use script for writing. This last predicate is tested using [method`Pango`.Language.includes_script]. This can be used to control Pango’s font selection for non-primary languages. For example, a PANGO_LANGUAGE enviroment variable set to “en:fa” makes Pango choose fonts suitable for Persian (fa) instead of Arabic (ar) when a segment of Arabic text is found in an otherwise non-Arabic text. The same trick can be used to choose a default language for Pango.Script.HAN when setting context language is not feasible.

New in version 1.4.

INVALID_CODE = -1

a value never returned from Pango.Script.for_unichar()

COMMON = 0

a character used by multiple different scripts

INHERITED = 1

a mark glyph that takes its script from the base glyph to which it is attached

DEVANAGARI = 10

Devanagari

MRO = 100

Mro.

New in version 1.40.

NABATAEAN = 101

Nabataean.

New in version 1.40.

OLD_NORTH_ARABIAN = 102

Old North Arabian.

New in version 1.40.

OLD_PERMIC = 103

Old Permic.

New in version 1.40.

PAHAWH_HMONG = 104

Pahawh Hmong.

New in version 1.40.

PALMYRENE = 105

Palmyrene.

New in version 1.40.

PAU_CIN_HAU = 106

Pau Cin Hau.

New in version 1.40.

PSALTER_PAHLAVI = 107

Psalter Pahlavi.

New in version 1.40.

SIDDHAM = 108

Siddham.

New in version 1.40.

TIRHUTA = 109

Tirhuta.

New in version 1.40.

ETHIOPIC = 11

Ethiopic

WARANG_CITI = 110

Warang Citi.

New in version 1.40.

AHOM = 111

Ahom.

New in version 1.40.

ANATOLIAN_HIEROGLYPHS = 112

Anatolian Hieroglyphs.

New in version 1.40.

HATRAN = 113

Hatran.

New in version 1.40.

MULTANI = 114

Multani.

New in version 1.40.

OLD_HUNGARIAN = 115

Old Hungarian.

New in version 1.40.

SIGNWRITING = 116

Signwriting.

New in version 1.40.

GEORGIAN = 12

Georgian

GOTHIC = 13

Gothic

GREEK = 14

Greek

GUJARATI = 15

Gujarati

GURMUKHI = 16

Gurmukhi

HAN = 17

Han

HANGUL = 18

Hangul

HEBREW = 19

Hebrew

ARABIC = 2

Arabic

HIRAGANA = 20

Hiragana

KANNADA = 21

Kannada

KATAKANA = 22

Katakana

KHMER = 23

Khmer

LAO = 24

Lao

LATIN = 25

Latin

MALAYALAM = 26

Malayalam

MONGOLIAN = 27

Mongolian

MYANMAR = 28

Myanmar

OGHAM = 29

Ogham

ARMENIAN = 3

Armenian

OLD_ITALIC = 30

Old Italic

ORIYA = 31

Oriya

RUNIC = 32

Runic

SINHALA = 33

Sinhala

SYRIAC = 34

Syriac

TAMIL = 35

Tamil

TELUGU = 36

Telugu

THAANA = 37

Thaana

THAI = 38

Thai

TIBETAN = 39

Tibetan

BENGALI = 4

Bengali

CANADIAN_ABORIGINAL = 40

Canadian Aboriginal

YI = 41

Yi

TAGALOG = 42

Tagalog

HANUNOO = 43

Hanunoo

BUHID = 44

Buhid

TAGBANWA = 45

Tagbanwa

BRAILLE = 46

Braille

CYPRIOT = 47

Cypriot

LIMBU = 48

Limbu

OSMANYA = 49

Osmanya

BOPOMOFO = 5

Bopomofo

SHAVIAN = 50

Shavian

LINEAR_B = 51

Linear B

TAI_LE = 52

Tai Le

UGARITIC = 53

Ugaritic

NEW_TAI_LUE = 54

New Tai Lue.

New in version 1.10.

BUGINESE = 55

Buginese.

New in version 1.10.

GLAGOLITIC = 56

Glagolitic.

New in version 1.10.

TIFINAGH = 57

Tifinagh.

New in version 1.10.

SYLOTI_NAGRI = 58

Syloti Nagri.

New in version 1.10.

OLD_PERSIAN = 59

Old Persian.

New in version 1.10.

CHEROKEE = 6

Cherokee

KHAROSHTHI = 60

Kharoshthi.

New in version 1.10.

UNKNOWN = 61

an unassigned code point.

New in version 1.14.

BALINESE = 62

Balinese.

New in version 1.14.

CUNEIFORM = 63

Cuneiform.

New in version 1.14.

PHOENICIAN = 64

Phoenician.

New in version 1.14.

PHAGS_PA = 65

Phags-pa.

New in version 1.14.

NKO = 66

N’Ko.

New in version 1.14.

KAYAH_LI = 67

Kayah Li.

New in version 1.20.1.

LEPCHA = 68

Lepcha.

New in version 1.20.1.

REJANG = 69

Rejang.

New in version 1.20.1.

COPTIC = 7

Coptic

SUNDANESE = 70

Sundanese.

New in version 1.20.1.

SAURASHTRA = 71

Saurashtra.

New in version 1.20.1.

CHAM = 72

Cham.

New in version 1.20.1.

OL_CHIKI = 73

Ol Chiki.

New in version 1.20.1.

VAI = 74

Vai.

New in version 1.20.1.

CARIAN = 75

Carian.

New in version 1.20.1.

LYCIAN = 76

Lycian.

New in version 1.20.1.

LYDIAN = 77

Lydian.

New in version 1.20.1.

BATAK = 78

Batak.

New in version 1.32.

BRAHMI = 79

Brahmi.

New in version 1.32.

CYRILLIC = 8

Cyrillic

MANDAIC = 80

Mandaic.

New in version 1.32.

CHAKMA = 81

Chakma.

New in version 1.32.

MEROITIC_CURSIVE = 82

Meroitic Cursive.

New in version 1.32.

MEROITIC_HIEROGLYPHS = 83

Meroitic Hieroglyphs.

New in version 1.32.

MIAO = 84

Miao.

New in version 1.32.

SHARADA = 85

Sharada.

New in version 1.32.

SORA_SOMPENG = 86

Sora Sompeng.

New in version 1.32.

TAKRI = 87

Takri.

New in version 1.32.

BASSA_VAH = 88

Bassa.

New in version 1.40.

CAUCASIAN_ALBANIAN = 89

Caucasian Albanian.

New in version 1.40.

DESERET = 9

Deseret

DUPLOYAN = 90

Duployan.

New in version 1.40.

ELBASAN = 91

Elbasan.

New in version 1.40.

GRANTHA = 92

Grantha.

New in version 1.40.

KHOJKI = 93

Kjohki.

New in version 1.40.

KHUDAWADI = 94

Khudawadi, Sindhi.

New in version 1.40.

LINEAR_A = 95

Linear A.

New in version 1.40.

MAHAJANI = 96

Mahajani.

New in version 1.40.

MANICHAEAN = 97

Manichaean.

New in version 1.40.

MENDE_KIKAKUI = 98

Mende Kikakui.

New in version 1.40.

MODI = 99

Modi.

New in version 1.40.

class Pango.Stretch(value)

Bases: GObject.GEnum

An enumeration specifying the width of the font relative to other designs within a family.

ULTRA_CONDENSED = 0

ultra condensed width

EXTRA_CONDENSED = 1

extra condensed width

CONDENSED = 2

condensed width

SEMI_CONDENSED = 3

semi condensed width

NORMAL = 4

the normal width

SEMI_EXPANDED = 5

semi expanded width

EXPANDED = 6

expanded width

EXTRA_EXPANDED = 7

extra expanded width

ULTRA_EXPANDED = 8

ultra expanded width

class Pango.Style(value)

Bases: GObject.GEnum

An enumeration specifying the various slant styles possible for a font.

NORMAL = 0

the font is upright.

OBLIQUE = 1

the font is slanted, but in a roman style.

ITALIC = 2

the font is slanted in an italic style.

class Pango.TabAlign(value)

Bases: GObject.GEnum

PangoTabAlign specifies where the text appears relative to the tab stop position.

LEFT = 0

the text appears to the right of the tab stop position

RIGHT = 1

the text appears to the left of the tab stop position until the available space is filled.

New in version 1.50.

CENTER = 2

the text is centered at the tab stop position until the available space is filled.

New in version 1.50.

DECIMAL = 3

text before the first occurrence of the decimal point character appears to the left of the tab stop position (until the available space is filled), the rest to the right.

New in version 1.50.

class Pango.TextTransform(value)

Bases: GObject.GEnum

An enumeration that affects how Pango treats characters during shaping.

New in version 1.50.

NONE = 0

Leave text unchanged

LOWERCASE = 1

Display letters and numbers as lowercase

UPPERCASE = 2

Display letters and numbers as uppercase

CAPITALIZE = 3

Display the first character of a word in titlecase

class Pango.Underline(value)

Bases: GObject.GEnum

The PangoUnderline enumeration is used to specify whether text should be underlined, and if so, the type of underlining.

NONE = 0

no underline should be drawn

SINGLE = 1

a single underline should be drawn

DOUBLE = 2

a double underline should be drawn

LOW = 3

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. Pango.Underline.SINGLE should be used for extended portions of text.

ERROR = 4

an underline indicating an error should be drawn below. The exact style of rendering is up to the PangoRenderer in use, but typical styles include wavy or dotted lines. This underline is typically used to indicate an error such as a possible mispelling; in some cases a contrasting color may automatically be used. This type of underlining is available since Pango 1.4.

SINGLE_LINE = 5

Like Pango.Underline.SINGLE, but drawn continuously across multiple runs. This type of underlining is available since Pango 1.46.

DOUBLE_LINE = 6

Like Pango.Underline.DOUBLE, but drawn continuously across multiple runs. This type of underlining is available since Pango 1.46.

ERROR_LINE = 7

Like Pango.Underline.ERROR, but drawn continuously across multiple runs. This type of underlining is available since Pango 1.46.

class Pango.Variant(value)

Bases: GObject.GEnum

An enumeration specifying capitalization variant of the font.

NORMAL = 0

A normal font.

SMALL_CAPS = 1

A font with the lower case characters replaced by smaller variants of the capital characters.

ALL_SMALL_CAPS = 2

A font with all characters replaced by smaller variants of the capital characters.

New in version 1.50.

PETITE_CAPS = 3

A font with the lower case characters replaced by smaller variants of the capital characters. Petite Caps can be even smaller than Small Caps.

New in version 1.50.

ALL_PETITE_CAPS = 4

A font with all characters replaced by smaller variants of the capital characters. Petite Caps can be even smaller than Small Caps.

New in version 1.50.

UNICASE = 5

A font with the upper case characters replaced by smaller variants of the capital letters.

New in version 1.50.

TITLE_CAPS = 6

A font with capital letters that are more suitable for all-uppercase titles.

New in version 1.50.

class Pango.Weight(value)

Bases: GObject.GEnum

An enumeration specifying the weight (boldness) of a font.

Weight is specified as a numeric value ranging from 100 to 1000. This enumeration simply provides some common, predefined values.

THIN = 100

the thin weight (= 100)

New in version 1.24.

ULTRAHEAVY = 1000

the ultraheavy weight (= 1000)

New in version 1.24.

ULTRALIGHT = 200

the ultralight weight (= 200)

LIGHT = 300

the light weight (= 300)

SEMILIGHT = 350

the semilight weight (= 350)

New in version 1.36.7.

BOOK = 380

the book weight (= 380)

New in version 1.24.

NORMAL = 400

the default weight (= 400)

MEDIUM = 500

the medium weight (= 500)

New in version 1.24.

SEMIBOLD = 600

the semibold weight (= 600)

BOLD = 700

the bold weight (= 700)

ULTRABOLD = 800

the ultrabold weight (= 800)

HEAVY = 900

the heavy weight (= 900)

class Pango.WrapMode(value)

Bases: GObject.GEnum

PangoWrapMode describes how to wrap the lines of a PangoLayout to the desired width.

For Pango.WrapMode.WORD, Pango uses break opportunities that are determined by the Unicode line breaking algorithm. For Pango.WrapMode.CHAR, Pango allows breaking at grapheme boundaries that are determined by the Unicode text segmentation algorithm.

WORD = 0

wrap lines at word boundaries.

CHAR = 1

wrap lines at character boundaries.

WORD_CHAR = 2

wrap lines at word boundaries, but fall back to character boundaries if there is not enough space for a full word.