Name
pglyphstring:IndexToX -- convert from character to x position
Synopsis
x_pos = pglyphstring:IndexToX(text$, analysis, index, trailing)
Function
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.

Inputs
text$
the text for the run
analysis
the analysis information return from itemize; this must be a Pango analysis object
index
the byte index within text$
trailing
whether we should compute the result for the beginning (False) or end (True) of the character
Results
x_pos
location to store result

Show TOC