A <PangoGlyphString> 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.
num-glyphsnumber of glyphs in this glyph string
glyphsarray of glyph information
log-clusterslogical cluster info, indexed by the byte index within the text corresponding to the glyph string
Copy a glyph string and associated storage.
Passed: a <PangoGlyphString>.
Returned: a <PangoGlyphString>, or #f.
the newly allocated <PangoGlyphString>
Compute the logical and ink extents of a glyph string.
See the documentation for font:get-glyph-extents! for details about the
interpretation of the rectangles.
Examples of logical (red) and ink (green) rects:
 
Passed: a <PangoGlyphString>.
Passed: a <PangoFont>.
Passed, filled in, and returned: a
<PangoRectangle>.
rectangle used to store the extents of the glyph string as drawn
Passed, filled in, and returned: a
<PangoRectangle>.
rectangle used to store the logical extents of the glyph string
Computes the extents of a sub-portion of a glyph string.
The extents are relative to the start of the glyph string range (the origin of their coordinate system is at the start of the range, not at the start of the entire glyph string).
Passed: a <PangoGlyphString>.
Passed: a 32-bit integer.
start index
Passed: a 32-bit integer.
end index (the range is the set of bytes with indices such that start <= index < end)
Passed: a <PangoFont>.
Passed, filled in, and returned: a
<PangoRectangle>.
rectangle used to store the extents of the glyph string range as drawn
Passed, filled in, and returned: a
<PangoRectangle>.
rectangle used to store the logical extents of the glyph string range
Free a glyph string and associated storage.
Passed: a <PangoGlyphString>.
a <PangoGlyphString>, may be #f
Given a <PangoGlyphString> and corresponding
text, determine the width corresponding to each character.
When multiple characters compose a single cluster, the width of the entire cluster is divided equally among the characters.
See also glyph-item:get-logical-widths!.
Passed: a <PangoGlyphString>.
Passed: a string.
the text corresponding to the glyphs
Passed: a 32-bit integer.
the length of text, in bytes
Passed: a 32-bit integer.
the embedding level of the string
Passed: a foreign pointer, or a bytevector. It is filled in, and returned: a foreign pointer.
an array whose length is the number of characters in text (equal to
g_utf8_strlen (text, length) unless text has NUL bytes) to
be filled in with the resulting character widths.
Computes the logical width of the glyph string.
This can also be computed using glyph-string:extents!. However, since this only computes the
width, it’s much faster. This is in fact only a convenience function
that computes the sum of geometry.width for each glyph in the
self.
Passed: a <PangoGlyphString>.
Returned: a 32-bit integer.
the logical width of the glyph string.
Create a new <PangoGlyphString>.
Returned: a <PangoGlyphString>.
the newly allocated <PangoGlyphString>, which
should be freed with glyph-string:free.
Resize a glyph string to the given length.
Passed: a <PangoGlyphString>.
Passed: a 32-bit integer.
the new length of the string