AttrIterator structure is used to represent an
iterator through a
AttrList. A new iterator is created
AttrList::get_iterator. Once the iterator
is created, it can be advanced through the style changes
in the text using
AttrIterator::next. At each
style change, the range of the current style segment and the
attributes currently in effect can be queried.
AttrList 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
the overlap between properties will meet stricter criteria.
Attribute 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 and should be initialized using
By default an attribute will have an all-inclusive range of [0,
Color structure is used to
represent a color in an uncalibrated RGB color-space.
Context structure stores global information
used to control the itemization process.
Coverage structure represents a map from Unicode characters
CoverageLevel. It is an opaque structure with no public fields.
[Deprecated since 1.38] The
EngineLang class is implemented by engines that
customize the rendering-system independent part of the
Pango pipeline for a particular script or language. For
instance, a custom
EngineLang could be provided for
Thai to implement the dictionary-based word boundary
lookups needed for that language.
[Deprecated since 1.38] The
EngineShape class is implemented by engines that
customize the rendering-system dependent part of the
Pango pipeline for a particular script or language.
EngineShape implementation is then specific to both
a particular rendering system or group of rendering systems
and to a particular script. For instance, there is one
EngineShape implementation to handle shaping Arabic
for Fontconfig-based backends.
Font structure is used to represent
a font in a rendering-system-independent matter.
To create an implementation of a
the rendering-system specific code should allocate
a larger structure that contains a nested
Font, fill in the
</structfield> member of
Font with a pointer to
FontClass, then call
pango_font_init on the structure.
FontDescription structure represents the description
of an ideal font. These structures are used both to list
what fonts are available on the system and also for specifying
the characteristics of a font to load.
FontFace structure is used to represent a group of fonts with
the same family, slant, weight, width, but varying sizes.
FontFamily structure is used to represent a family of related
font faces. The faces in a family share a common design, but differ in
slant, weight, width and other aspects.
FontMap represents the set of fonts available for a
particular rendering system. This is a virtual object with
implementations being specific to particular rendering systems. To
create an implementation of a
FontMap, the rendering-system
specific code should allocate a larger structure that contains a nested
FontMap, fill in the
</structfield> member of the nested
FontMap with a
pointer to a appropriate
FontMapClass, then call
pango_font_map_init on the structure.
The bits in a
FontMask correspond to fields in a
FontDescription that have been set.
FontMetrics structure holds the overall metric information
for a font (possibly restricted to a script). The fields of this
structure are private to implementations of a font backend. See
the documentation of the corresponding getters for documentation
of their meaning.
Fontset represents a set of
Font to use
when rendering text. It is the result of resolving a
FontDescription against a particular
It has operations for finding the component font for
a particular Unicode character, and for finding a composite
set of metrics for the entire fontset.
FontsetSimple is a implementation of the abstract
Fontset base class in terms of an array of fonts,
which the creator provides when constructing the
GlyphItem is a pair of a
Item and the glyphs
resulting from shaping the text corresponding to an item.
As an example of the usage of
GlyphItem, the results
of shaping text with
Layout is a list of
each of which contains a list of
GlyphItemIter is an iterator over the clusters in a
</firstterm> of the
iterator is the logical direction of text. That is, with increasing
start_char values. If
glyph_item is right-to-left
(that is, if
</literal> is odd),
start_glyph decreases as the iterator moves forward. Moreover,
in right-to-left cases,
start_glyph is greater than
GlyphString structure is used to store strings
of glyphs with geometry and visual attribute information.
The storage for the glyph information is owned
by the structure which simplifies memory management.
Item structure stores information about a segment of text.
Layout structure represents an entire paragraph
of text. It is initialized with a
Context, UTF-8 string
and set of attributes for that string. Once that is done, the
set of formatted lines can be extracted from the object,
the layout can be rendered, and conversion between logical
character positions within the layout's text, and the physical
position of the resulting glyphs can be made.
LayoutIter structure can be used to
iterate over the visual extents of a
LayoutLine structure represents one of the lines resulting
from laying out a paragraph via
structures are obtained by calling
are only valid until the text, attributes, or settings of the
Layout are modified.
A structure specifying a transformation between user-space
coordinates and device coordinates. The transformation
is given by
Renderer is a base class for objects that are used to
render Pango objects such as
TabArray struct contains an array
of tab stops. Each tab stop has an alignment and a position.
Alignment describes how to align the lines of a
Layout within the
available space. If the
Layout is set to justify
Layout::set_justify, this only has effect for partial lines.
distinguishes between different types of attributes. Along with the
predefined values, it is possible to allocate additional values
for custom attributes using
AttrType::register. The predefined
values are given below. The type of structure used to store the
attribute is listed in parentheses after the description.
BidiType type represents the bidirectional character
type of a Unicode character as specified by the
Unicode bidirectional algorithm
Used to indicate how well a font can represent a particular Unicode
character point for a particular script.
Direction type represents a direction in the
Unicode bidirectional algorithm; not every value in this
enumeration makes sense for every usage of
for example, the return value of
pango_find_base_dir cannot be
Direction::WeakRtl, since every character is either
neutral or has a strong direction; on the other hand
Direction::Neutral doesn't make sense to pass
EllipsizeMode type describes 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.
Gravity type 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 PangoMatrix,
and then glyph orientation is controlled using
Not every value in this enumeration makes sense for every usage of
Gravity; for example,
Gravity::Auto only can be passed to
Context::set_base_gravity and can only be returned by
GravityHint defines how horizontal scripts should behave in a
vertical context. That is, English excerpt in a vertical paragraph for
RenderPart defines different items to render for such
purposes as setting colors.
Script enumeration identifies different writing
systems. The values correspond to the names as defined in the
Unicode standard. See Unicode Standard Annex
24: Script names
An enumeration specifying the width of the font relative to other designs
within a family.
An enumeration specifying the various slant styles possible for a font.
TabAlign specifies where a tab stop appears relative to the text.
Underline enumeration is used to specify
whether text should be underlined, and if so, the type
An enumeration specifying capitalization variant of the font.
An enumeration specifying the weight (boldness) of a font. This is a numerical
value ranging from 100 to 1000, but there are some predefined values:
WrapMode describes how to wrap the lines of a
Layout to the desired width.