Text Attributes
Font and other attributes for annotating text.
Attributed text is used in a number of places in Pango. It
is used as the input to the itemization process and also when
creating a #PangoLayout. The data types and functions in
this section are used to represent and manipulate sets
of attributes applied to a portion of text.
distinguishes between different types of attributes. Along with the
predefined values, it is possible to allocate additional values
for custom attributes using pango_attr_register_type(). The predefined
values are given below. The type of structure used to store the
attribute is listed in parentheses after the description.
@PANGO_ATTR_LANG: language tag (#PangoAttrString)
@PANGO_ATTR_FAMILY: font family name list (#PangoAttrString)
@PANGO_ATTR_STYLE: font slant style (#PangoAttrInt)
@PANGO_ATTR_WEIGHT: font weight (#PangoAttrInt)
@PANGO_ATTR_VARIANT: font variant (normal or small caps) (#PangoAttrInt)
@PANGO_ATTR_STRETCH: font stretch (#PangoAttrInt)
@PANGO_ATTR_SIZE: font size in 1000th's of a point (#PangoAttrInt)
@PANGO_ATTR_FONT_DESC:
@PANGO_ATTR_FOREGROUND: foreground color (#PangoAttrColor)
@PANGO_ATTR_BACKGROUND: background color (#PangoAttrColor)
@PANGO_ATTR_UNDERLINE: whether the text has an underline (#PangoAttrInt)
@PANGO_ATTR_STRIKETHROUGH: whether the text is struck-through (#PangoAttrInt)
@PANGO_ATTR_RISE: baseline displacement (#PangoAttrInt)
The #PangoAttrClass structure stores the type and operations for
a particular type of attribute. The functions in this structure should
not be called directly. Instead, one should use the wrapper functions
provided for #PangoAttribute.
@type: the type ID for this attribute
@copy: function to duplicate an attribute of this type (see pango_attribute_copy())
@destroy: function to free an attribute of this type (see pango_attribute_destroy())
@compare: function to compare two attributes of this type (see pango_attribute_compare())
The #PangoAttribute structure represents the common portions of all
attributes. Particular types of attributes include this structure
as their initial portion. The common portion of the attribute holds
the range to which the value in the type-specific part of the attribute
applies.
@klass: the class structure holding information about the type of the attribute
@start_index: the start index of the range.
@end_index: end index of the range. The character at this index is not
included in the range.
The #PangoAttrString structure is used to represent attributes with
a string value.
@attr: the common portion of the attribute
@value: the value of the attribute
The #PangoAttrString structure is used to represent attributes that
are colors.
@attr: the common portion of the attribute
@red: the red value, in the range 0 to 65535
@green: the green value
@blue: the blue value
The #PangoAttrString structure is used to represent attributes with
a integer or enumeration value.
@attr: the common portion of the attribute
@value: the value of the attribute
The #PangoAttrFontDesc structure is used to store an attribute that
sets all aspects of the font description at once.
@attr: the common portion of the attribute
@desc: the font description which is the value of this attribute
@name:
@Returns:
@attr:
@Returns:
@attr1:
@attr2:
@Returns:
@attr:
@lang:
@Returns:
@family:
@Returns:
@style:
@Returns:
@variant:
@Returns:
@stretch:
@Returns:
@weight:
@Returns:
@size:
@Returns:
@desc:
@Returns:
@red:
@green:
@blue:
@Returns:
@red:
@green:
@blue:
@Returns:
@strikethrough:
@Returns:
@underline:
@Returns:
the #PangoUnderline enumeration is used to specify
whether text should be underlined, and if so, the type
of underlining.
@PANGO_UNDERLINE_NONE: no underline should be drawn.
@PANGO_UNDERLINE_SINGLE: a single underline should be drawn.
@PANGO_UNDERLINE_DOUBLE: a double underline should be drawn.
@PANGO_UNDERLINE_LOW: 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.
@rise:
@Returns:
The #PangoAttrList structure represents a list of attributes
that apply to a section of text. The attributes are, in general,
allowed to overlap in an arbitrary fashion, however, if the
attributes are manipulated only through pango_attr_list_change(),
the overlap between properties will meet stricter criteria.
Since the #PangoAttrList structure is stored as a linear list,
it is not suitable for storing attributes for large amounts
of text. In general, you should not use a single #PangoAttrList
for more than one paragraph of text.
@Returns:
@list:
@list:
@list:
@attr:
@list:
@attr:
@list:
@Returns:
The #PangoAttrIterator structure is used to represent an
iterator through a #PangoList. A new iterator is created
with pango_attr_list_get_iterator(). Once the iterator
is created, it can be advanced through the style changes
in the text using pango_attr_iterator_next(). At each
style change, the range of the current style segment and the
attributes currently in effect can be queried.
@iterator:
@Returns:
@iterator:
@start:
@end:
@iterator:
@type:
@Returns:
@iterator:
@base:
@current:
@extra_attrs:
@iterator: