Commit 30a7ee50 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

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)
parent 7d323f07
Pipeline #5767 failed with stage
in 10 minutes and 29 seconds
......@@ -26,6 +26,7 @@ along with GNU Emacs. If not, see <>. */
#include "composite.h"
#include "font.h"
#include "dispextern.h"
#include "buffer.h"
......@@ -438,7 +439,11 @@ hbfont_shape (Lisp_Object lgstring, Lisp_Object direction)
/* If the caller didn't provide a meaningful DIRECTION, let HarfBuzz
guess it. */
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)))
hb_direction_t dir = HB_DIRECTION_LTR;
if (EQ (direction, QL2R))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment