Kenichi Handa writes: >> I found that the problem is that the current composition for >> Arabic requires that a whole word must be composed. So, if >> there's a face change within a word, Arabic composition >> function is given just a partial word, and that results in >> the incorrect Arabic shaping. This is a difficult problem, >> and I need a time to find a solution. > > I've just installed a fix to trunk. I can confirm that the issue with unshaped glyphs while highlighting words is now fixed. Thanks. However, long Arabic strings still have unshaped middle parts and bad margin. See the attached screenshot which is the output of M-30- in an empty buffer. Also the following code produces duplicate strings, compared to when auto-composition-mode is off. (let () (setq bidi-display-reordering t) (insert "\n\n") (insert "كمنت") (insert "ببببببببببببببببببب"))