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.
<picture> <source srcset="glyphstring-positions-dark.png" media="(prefers-color-scheme: dark)"> <img alt="Glyph positions" src="glyphstring-positions-light.png"> </picture>
this |
the glyphs return from [func@shape] |
text |
the text for the run |
length |
the number of bytes (not characters) in |
analysis |
the analysis information return from [func@itemize] |
index_ |
the byte index within |
trailing |
whether we should compute the result for the beginning (false) or end ( true) of the character. |
x_pos |
location to store result |