aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2020-06-05 10:56:01 +0300
committerEli Zaretskii2020-06-05 10:56:01 +0300
commit30a7ee505aca3cc285699bae1630a28185519d99 (patch)
treed3e5bfe5179793e8677229375c78fa5a10b16ca9 /src
parent7d323f07c0b540547c4aab38069972a918eff9d3 (diff)
downloademacs-30a7ee505aca3cc285699bae1630a28185519d99.tar.gz
emacs-30a7ee505aca3cc285699bae1630a28185519d99.zip
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)
Diffstat (limited to 'src')
-rw-r--r--src/hbfont.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/hbfont.c b/src/hbfont.c
index 576c5fe7f60..4b3f64ef504 100644
--- a/src/hbfont.c
+++ b/src/hbfont.c
@@ -26,6 +26,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
26#include "composite.h" 26#include "composite.h"
27#include "font.h" 27#include "font.h"
28#include "dispextern.h" 28#include "dispextern.h"
29#include "buffer.h"
29 30
30#ifdef HAVE_NTGUI 31#ifdef HAVE_NTGUI
31 32
@@ -438,7 +439,11 @@ hbfont_shape (Lisp_Object lgstring, Lisp_Object direction)
438 439
439 /* If the caller didn't provide a meaningful DIRECTION, let HarfBuzz 440 /* If the caller didn't provide a meaningful DIRECTION, let HarfBuzz
440 guess it. */ 441 guess it. */
441 if (!NILP (direction)) 442 if (!NILP (direction)
443 /* If they bind bidi-display-reordering to nil, the DIRECTION
444 they provide is meaningless, and we should let HarfBuzz guess
445 the real direction. */
446 && !NILP (BVAR (current_buffer, bidi_display_reordering)))
442 { 447 {
443 hb_direction_t dir = HB_DIRECTION_LTR; 448 hb_direction_t dir = HB_DIRECTION_LTR;
444 if (EQ (direction, QL2R)) 449 if (EQ (direction, QL2R))