Subject: bug#28312: 25.2; Arabic script changes when scrolling

From: Eli Zaretskii <[email-masked]>
Date: Fri, 01 Sep 2017 09:45:08 +0300

> From: Nick Helm <[email-masked]>
> Date: Fri, 01 Sep 2017 13:03:02 +1200
> 
> With bidi enabled, Arabic text changes unexpectedly when scrolling or
> moving point with the mouse.
> 
> Recipe:
>   Emacs -Q
>   C-h h ;visit HELLO file
>   ;use the mouse to scroll slowly
> 
> Observe the text on the line that starts with the word Arabic. As the
> buffer scrolls, some of the characters in the Arabic representations of
> the words "Arabic" and "Hello" change between at least two glyphs.

I don't see this here, but I'm not on Darwin.  Can anyone reproduce
this on GNU/Linux?

Does the character also change its shape if you move cursor across
that line, especially when the cursor moves across the character?

> Here's a quick screen cap to show what I mean:
> https://ln.sync.com/dl/22d37f320/fwujc85a-dhb63yfw-cv5vhzj5-5qsis2h8

I cannot watch this movie with the software I have installed.

> The problem goes away when I change the file local variable:
>   ;;; bidi-display-reordering: nil 

Not much sense in doing that for displaying Arabic!

> My system defaults to Geeza Pro to display Arabic script, but the
> problem also occurs with other fonts, such as Arial Unicode MS. I don't
> see the problem with other RTL scripts in the HELLO file, such as
> Hebrew.

Arabic needs shaping support from the underlying font back-end, so
(unless this will be reproduced on GNU/Linux) it sounds like something
is wrong with either the back-end Emacs uses on Darwin, or its version
you have installed, or with the support code in Emacs which is needed
for displaying complex RTL scripts such as Arabic.

FWIW, I tried Arial Unicode here, and saw no problem with that,
either.