[no subject]



 1) Apply the Unicode bidi algorithm to assign a "directional level" to 
    runs of characters 

 2) Reorder the runs into visual order.

 3) Group characters within each run into "clusters" that proceed in the direction
     of the run.

 4) Convert the characters in each cluster into some number of glyphs.

Within each cluster there is no concept of which character goes with which glyph.
(A cluster might be:

  A character with an accent rendering as base character + combining
   accent glyph. (1 character => 2 glyphs)

  2 characters (say Englush f+i that ligature into one glyph). (2 glyphs => 1 character)

Or something more complex.)


It would be possible to get the idea of a visual position by just
assuming that the characters within each glyph are ordered in the
direction of the run.  (Pango already assumes something like this when
there are multiple selectable entities within a cluster.) 

And it's certainly possible (if not terribly convenient) to compute this
within the public Pango API.

But why do you want to do this? It's not an operation that I see much
use for.

Regards,
                                        Owen



 





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