Optionalproperties: Partial<{ glyphs: GlyphInfo[]; log_clusters: number; num_glyphs: number }>Copy a glyph string and associated storage.
the newly allocated Pango.GlyphString
Free a glyph string and associated storage.
Given a Pango.GlyphString 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 Pango.GlyphItem.get_logical_widths.
the text corresponding to the glyphs
the length of text, in bytes
the embedding level of the string
Computes the logical width of the glyph string.
This can also be computed using Pango.GlyphString.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 glyphs.
the logical width of the glyph string.
Converts from character position to x position.
The X position is measured from the left edge of the run. Character positions are obtained using font metrics for ligatures where available, and computed by dividing up each cluster into equal portions, otherwise.
the text for the run
the number of bytes (not characters) in text.
the analysis information return from itemize
the byte index within text
whether we should compute the result for the beginning (false) or end (true) of the character.
Converts from character position to x position.
This variant of Pango.GlyphString.index_to_x additionally accepts a Pango.LogAttr array. The grapheme boundary information in it can be used to disambiguate positioning inside some complex clusters.
the text for the run
the number of bytes (not characters) in text.
the analysis information return from itemize
Pango.LogAttr array for text
the byte index within text
whether we should compute the result for the beginning (false) or end (true) of the character.
Resize a glyph string to the given length.
the new length of the string
Convert from x offset to character position.
Character positions are computed by dividing up each cluster into equal portions. In scripts where positioning within a cluster is not allowed (such as Thai), the returned value may not be a valid cursor position; the caller must combine the result with the logical attributes for the text to compute the valid cursor position.
Staticnew
A Pango.GlyphString 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.