Subject: Re: bug#41005: problem with rendering Persian text in Emacs 27

From: Pip Cet <[email-masked]>
Date: Fri, 05 Jun 2020 06:39:34 +0000

hossein valizadeh <[email-masked]> writes:
> I tried the patch.
> The eww problem is solved, but the problem still there, when I enable auto-fill-mode or
> column-number-mode.

I only see it with column-number-mode so far (but, again, I can
reproduce it and debug further).

It's this code in indent.c

      /* Check composition sequence.  */
      if (cmp_it.id >= 0
	  || (scan == cmp_it.stop_pos
	      && composition_reseat_it (&cmp_it, scan, scan_byte, end,
					w, NEUTRAL_DIR, NULL, Qnil)))

which appears to think the sixth argument to composition_reseat_it is a
direction (it probably should be). It's actually a bidi level, and
passing NEUTRAL_DIR, which is 0, results in L2R layout being used by
hbfont_shape, as in the eww bug.

Will write a patch soon if no one beats me to it.