> Date: Fri, 03 Sep 2010 16:25:49 +0300 > From: Eli Zaretskii <[email protected]> > Cc: [email protected], [email protected], [email protected] > > Am I missing something?
I think I found what I was missing. This part: > During the buffer scan that delivers characters to PRODUCE_GLYPHS, if > the next character to be delivered is a composed character, then > composition_reseat_it and next_element_from_composition are called. > If they succeed to compose the character with one or more following > characters, the whole sequence of characters that where composed is > recorded in the glyph row as a single element of type IT_COMPOSITION. > This single element is expanded into the actual font glyphs when the > glyph row is drawn by the terminal-specific draw_glyphs method. The > bidi reordering treats this single element as if it were a single > glyph, and thus does not reorder its font glyphs. So this single > element winds up in the glyph row in the position corresponding to the > first character of the composed sequence. is inaccurate, and therefore leads to incorrect conclusions. A (hopefully) more correct description is this: During the buffer scan that delivers characters to PRODUCE_GLYPHS, if the next character to be delivered is a composed character, then composition_reseat_it and next_element_from_composition are called. If they succeed to compose the character with one or more following characters, the whole sequence of characters that where composed is recorded in the `struct composition_it' object that is part of the buffer iterator. The composed sequence could produce one or more font glyphs (called "grapheme clusters") on the screen. Each of these grapheme clusters is then delivered to PRODUCE_GLYPHS in the direction corresponding to the current bidi scan direction. In particular, if the bidi iterator currently scans the buffer backwards, the grapheme clusters are delivered back to front. This reorders the grapheme clusters as appropriate for the current bidi context. If this is correct, then the conclusion is that the font driver's `shape' method should return the grapheme clusters in LGSTRING in logical order; they will be reordered correctly by next_element_from_composition, composition_reseat_it, and set_iterator_to_next, as described above. Did I get it right this time? _______________________________________________ emacs-bidi mailing list [email protected] http://lists.gnu.org/mailman/listinfo/emacs-bidi
