Mark Leisher wrote on 2000-09-29 08:25 UTC:
> Basically any Arabic letters next to each other will cause shaping to occur.

I think the way to implement this is in the redraw routines of xterm. In
other words, the character cell matrix stores the U+06xx characters
exactly as xterm received them over the pty (in order to preserve the
transmitted text for retransmission via selection). After you have
written these neutral characters into the charcell matrix, you call the
redraw rountine for a cell matrix that is one character larger to the
left and two to the right (for ligature handling) than the area that was
just overwritten. The redraw routine then performs on-the-fly the
selection of suitable presentation forms and draws them on the screen.
The Unicode Arabic algorithm can be implemented pretty much as it is,
only the rule that combining characters do not interfere with
presentation form selection has to be bent slightly, because xterm will
treat ZWJ and ZWNJ like combining characters, and these do definitely
interfere with presentation form selection.

While Arabic shaping is probably best done at redraw time, I think the
bidi handling is probably best done when characters are written into the
charcell matrix, i.e. the matrix should remain in visual order.

Markus

-- 
Markus G. Kuhn, Computer Laboratory, University of Cambridge, UK
Email: mkuhn at acm.org,  WWW: <http://www.cl.cam.ac.uk/~mgk25/>

-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/

Reply via email to