Re: shaper PangoGlyphString terminology



On Wed, 2004-04-28 at 02:22, Patrick wrote:
> A simple question,
> 
> When a shaper returns a PangoGlyphString does the
> PangoGlyphString.PangoGlyphInfo.PangoGlyphGeometry.x_offset / .y_offset
> refer to the offset from the base glyph of the grapheme cluster
> containing the glyph or from the very 1st grapheme cluster of the
> supplied text? That is, what exactly is the "nominal character position"
> mentioned in the API documentation?

Note that grapheme clusters have absolutely nothing to do with
positioning of glyphs. Graphemes are purely related to things
like allowed cursor positions.

The nomimal positions are gotten by adding up the widths
of preceding characters

 x0 = 0
 x1 = x0 + glyphs->glyphs[0].geometry.width
 x2 = x1 + glyphs->glyphs[1].geometry.width

And x_offset/y_offset are added to that.

Regards,
							Owen


Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]