* Re: emacs-27 30a7ee5: Fix Arabic shaping when eww/shr fill the text to be rendered
[not found] ` <20200605075724.3C52120A26@vcs0.savannah.gnu.org>
@ 2020-06-05 13:58 ` Stefan Monnier
2020-06-05 14:20 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2020-06-05 13:58 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
> Fix Arabic shaping when eww/shr fill the text to be rendered
> * src/hbfont.c (hbfont_shape): Don't use DIRECTION if the current
> buffer has bidi reordering disabled. (Bug#41005)
[...]
> - if (!NILP (direction))
> + if (!NILP (direction)
> + /* If they bind bidi-display-reordering to nil, the DIRECTION
> + they provide is meaningless, and we should let HarfBuzz guess
> + the real direction. */
> + && !NILP (BVAR (current_buffer, bidi_display_reordering)))
Hmm... so indeed I see that SHR binds `bidi-display-reordering`.
Isn't that a problem, since its docstring says:
[...]
Setting this to nil is intended for use in debugging the display code.
[...]
Can we change SHR so it doesn't bind this var?
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: emacs-27 30a7ee5: Fix Arabic shaping when eww/shr fill the text to be rendered
2020-06-05 13:58 ` emacs-27 30a7ee5: Fix Arabic shaping when eww/shr fill the text to be rendered Stefan Monnier
@ 2020-06-05 14:20 ` Eli Zaretskii
2020-06-05 15:20 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2020-06-05 14:20 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Fri, 05 Jun 2020 09:58:57 -0400
>
> > Fix Arabic shaping when eww/shr fill the text to be rendered
> > * src/hbfont.c (hbfont_shape): Don't use DIRECTION if the current
> > buffer has bidi reordering disabled. (Bug#41005)
> [...]
> > - if (!NILP (direction))
> > + if (!NILP (direction)
> > + /* If they bind bidi-display-reordering to nil, the DIRECTION
> > + they provide is meaningless, and we should let HarfBuzz guess
> > + the real direction. */
> > + && !NILP (BVAR (current_buffer, bidi_display_reordering)))
>
> Hmm... so indeed I see that SHR binds `bidi-display-reordering`.
Yes, it does. But the problem is more general, so the fix is not just
a kludge to fix what shr does. As the comment explains.
> Isn't that a problem, since its docstring says:
>
> [...]
> Setting this to nil is intended for use in debugging the display code.
> [...]
It's "do like I say, not like I do" ;-)
> Can we change SHR so it doesn't bind this var?
I didn't see any better way at the time. Shr's naïve filling
algorithm cannot cope with the complexity of RTL text in an LTR
paragraph, when a long line has been continued. Maybe it's even
entirely impossible to DTRT in Lisp in these cases. But if you or
someone else have ideas, please describe them.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: emacs-27 30a7ee5: Fix Arabic shaping when eww/shr fill the text to be rendered
2020-06-05 14:20 ` Eli Zaretskii
@ 2020-06-05 15:20 ` Stefan Monnier
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2020-06-05 15:20 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
> Yes, it does. But the problem is more general, so the fix is not just
> a kludge to fix what shr does. As the comment explains.
Yes, the fix is fine.
>> Isn't that a problem, since its docstring says:
>>
>> [...]
>> Setting this to nil is intended for use in debugging the display code.
>> [...]
>
> It's "do like I say, not like I do" ;-)
;-)
>> Can we change SHR so it doesn't bind this var?
>
> I didn't see any better way at the time. Shr's naïve filling
> algorithm cannot cope with the complexity of RTL text in an LTR
> paragraph, when a long line has been continued. Maybe it's even
> entirely impossible to DTRT in Lisp in these cases. But if you or
> someone else have ideas, please describe them.
Fair enough, thanks,
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-05 15:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20200605075722.16213.57047@vcs0.savannah.gnu.org>
[not found] ` <20200605075724.3C52120A26@vcs0.savannah.gnu.org>
2020-06-05 13:58 ` emacs-27 30a7ee5: Fix Arabic shaping when eww/shr fill the text to be rendered Stefan Monnier
2020-06-05 14:20 ` Eli Zaretskii
2020-06-05 15:20 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.