Glyph Storage
Structures for storing information about glyphs.
pango_shape() produces a string of glyphs which
can be measured or drawn to the screen. The following
structures are used to store information about
glyphs.
The PANGO_SCALE macro 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.) PANGO_SCALE is currently
1000, 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.
Converts a dimension to device units.
@d: a dimension in Pango units.
The #PangoRectangle structure represents a rectangle. It is frequently
used to represent the logical or ink extents of a single glyph or section
of text. (See, for instance, pango_font_get_glyph_extents())
@x: X coordinate of the left side of the rectangle.
@y: Y coordinate of the the top side of the rectangle.
@width: width of the rectangle.
@height: height of the rectangle.
Extracts the ascent from a #PangoRectangle
representing glyph extents. The ascent is the distance from the
baseline to the highest point of the character. This is positive if the
glyph ascends above the baseline.
@rect: a #PangoRectangle
Extracts the descent from a #PangoRectangle
representing glyph extents. The descent is the distance from the
baseline to the lowest point of the character. This is positive if the
glyph descends below the baseline.
@rect: a #PangoRectangle
Extracts the left bearing from a #PangoRectangle
representing glyph extents. The left bearing is the distance from the
horizontal origin to the farthest left point of the character.
This is positive for characters drawn completely to the right of the
glyph origin.
@rect: a #PangoRectangle
Extracts the right bearing from a #PangoRectangle
representing glyph extents. The right bearing is the distance from the
horizontal origin to the farthest right point of the character.
This is positive except for characters drawn completely to the left of the
horizontal origin.
@rect: a #PangoRectangle
The #PangoGlyph structure represents a single glyph in the output
form of a string. It contains the following fields.
#PangoGlyphIndex glyph;
the index of the glyph into the font. (Rendering system
dependent).
#PangoCFont *font;
the rendering-system-specific font information for this glyph.
The #PangoGlyphInfo structure represents a single glyph together with
positioning information and visual attributes.
It contains the following fields.
@glyph: the glyph itself.
@geometry: the positional information about the glyph.
@attr: the visual attributes of the glyph.
The #PangoGlyphGeometry structure contains width and positioning
information for a single glyph. Distances are in
1/64ths of a point.
#PangoGlyphUnit width;
the logical width to use for the the character.
#PangoCFont *x_offset;
horizontal offset from nominal character position.
#PangoCFont *y_offset;
vertical offset from nominal character position.
@width:
@x_offset:
@y_offset:
The #PangoGlyphUnit type is used to store dimensions within
Pango. Dimensions are stored in 1/64ths of a point.
The PangoGlyphVisAttr is used to communicate information between
the shaping phase and the rendering phase. It's contents
are still evolving.
#guint is_cluster_start : 1;
set for the first logical glyph in each cluster. (Clusters
are stored in visual order, within the cluster, glyphs
are always ordered in logical order, since visual
order is meaningless; that is, in Arabic text, accent glyphs
follow the glyphs for the base character.)
@is_cluster_start:
The #PangoGlyphString 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.
#PangoGlyphString contains the following publically
accessible fields
gint #num_glyphs;
the number of glyphs in the string.
PangoGlyph *#glyphs;
an array of glyphs of length num_glyphs.
PangoGlyphGeometry *#geometry;
an array of #PangoGlyphGeometry structures corresponding to glyphs.
PangoGlyphVisAttr *#attrs;
an array of #PangoGlyphVisAttr structures corresponding to glyphs.
gint *#log_clusters;
for each glyph, the character index (should this be byte
index?) of the starting character for the cluster.
@num_glyphs:
@glyphs:
@log_clusters:
The GObject type for #PangoGlyphString.
@Returns:
@string:
@Returns:
@string:
@new_len:
@string:
@glyphs:
@font:
@ink_rect:
@logical_rect:
@glyphs:
@start:
@end:
@font:
@ink_rect:
@logical_rect:
@glyphs:
@text:
@length:
@analysis:
@index:
@trailing:
@x_pos:
@glyphs:
@text:
@length:
@analysis:
@x_pos:
@index:
@trailing:
@glyphs:
@text:
@length:
@embedding_level:
@logical_widths: