Re: How do I get X, Y pos and PangoLogAttr of each glyph in a rendered string?

> > You definitely can do it with glyphs, but is that really what you want?
> > There's simpler API in pango to do that per cluster.  Note that you cannot map
> > a glyph to the original string (and hence PangoLogAttr).  You can only do that
> > per cluster.
> > 
> > Check PangoLayoutIter.
> > 
> > I'm also attaching Python code that draws boxes around clusters.
> > 
> > Hope that helps,
> > behdad
> This python code is very helpful.  How difficult would it be to add an
> extra function that draws boxes around words?

Taking a closer look at this last night, I made a primitive version of
this extentdemo in vala.  Maybe it is useful for someone else:

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