Package: pango

Function pango:glyph-string-index-to-x

Lambda List

pango:glyph-string-index-to-x (glyphs text len analysis index trailing)

Arguments

glyphs -- a pango:glyph-string instance
text -- a string for the text of the run
len -- an integer for the number of bytes in text
analysis -- a pango:analysis instance for the analysis information from the pango:itemize function
index -- an integer for the byte index within text
trailing -- a boolean whether we should compute the result for the beginning (false) or end (true) of the character

Return Value

The integer for the result.

Details

Converts from character position to x position.


Figure: Glyph string positions


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.
 

See also

2026-03-08