PangoAttrType

The pango.types.AttrType 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.

Values

ValueMeaning
Invalid0

does not happen

Language1
Family2

font family name list (pango.attr_string.AttrString)

Style3

font slant style (pango.attr_int.AttrInt)

Weight4
Variant5

font variant (normal or small caps) (pango.attr_int.AttrInt)

Stretch6

font stretch (pango.attr_int.AttrInt)

Size7

font size in points scaled by PANGO_SCALE (pango.attr_int.AttrInt)

FontDesc8
Foreground9

foreground color (pango.attr_color.AttrColor)

Background10

background color (pango.attr_color.AttrColor)

Underline11

whether the text has an underline (pango.attr_int.AttrInt)

Strikethrough12

whether the text is struck-through (pango.attr_int.AttrInt)

Rise13

baseline displacement (pango.attr_int.AttrInt)

Shape14
Scale15

font size scale factor (pango.attr_float.AttrFloat)

Fallback16

whether fallback is enabled (pango.attr_int.AttrInt)

LetterSpacing17

letter spacing (struct@PangoAttrInt)

UnderlineColor18

underline color (pango.attr_color.AttrColor)

StrikethroughColor19

strikethrough color (pango.attr_color.AttrColor)

AbsoluteSize20

font size in pixels scaled by PANGO_SCALE (pango.attr_int.AttrInt)

Gravity21

base text gravity (pango.attr_int.AttrInt)

GravityHint22

gravity hint (pango.attr_int.AttrInt)

FontFeatures23

OpenType font features (pango.attr_font_features.AttrFontFeatures). Since 1.38

ForegroundAlpha24

foreground alpha (pango.attr_int.AttrInt). Since 1.38

BackgroundAlpha25

background alpha (pango.attr_int.AttrInt). Since 1.38

AllowBreaks26

whether breaks are allowed (pango.attr_int.AttrInt). Since 1.44

Show27

how to render invisible characters (pango.attr_int.AttrInt). Since 1.44

InsertHyphens28

whether to insert hyphens at intra-word line breaks (pango.attr_int.AttrInt). Since 1.44

Overline29

whether the text has an overline (pango.attr_int.AttrInt). Since 1.46

OverlineColor30

overline color (pango.attr_color.AttrColor). Since 1.46

LineHeight31

line height factor (pango.attr_float.AttrFloat). Since: 1.50

AbsoluteLineHeight32

line height (pango.attr_int.AttrInt). Since: 1.50

TextTransform33
Word34

override segmentation to classify the range of the attribute as a single word (pango.attr_int.AttrInt). Since 1.50

Sentence35

override segmentation to classify the range of the attribute as a single sentence (pango.attr_int.AttrInt). Since 1.50

BaselineShift36

baseline displacement (pango.attr_int.AttrInt). Since 1.50

FontScale37

font-relative size change (pango.attr_int.AttrInt). Since 1.50