From 5aaad0445dc5a353f2da11fa7f2390d082884abe Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 6 Aug 2022 16:55:51 +0300 Subject: [PATCH] Speed up display of Arabic * lisp/language/misc-lang.el (composition-function-table): Move some of the Arabic composition rules to ZWJ and ZWNJ cells. This speeds up display of Arabic by a factor of 2. (Bug#56682) --- lisp/language/misc-lang.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el index 1e915c2f838..3d5b68f84be 100644 --- a/lisp/language/misc-lang.el +++ b/lisp/language/misc-lang.el @@ -137,10 +137,13 @@ thin (i.e. 1-dot width) space." (set-char-table-range composition-function-table '(#x600 . #x74F) - (list (vector "[\u200C\u200D][\u0600-\u074F\u200C\u200D]+" - 1 #'arabic-shape-gstring) - (vector "[\u0600-\u074F\u200C\u200D]+" + (list (vector "[\u0600-\u074F\u200C\u200D]+" 0 #'arabic-shape-gstring))) +(set-char-table-range + composition-function-table + '(#x200C . #x200D) + (list (vector "[\u200C\u200D][\u0600-\u074F\u200C\u200D]+" + 0 #'arabic-shape-gstring))) ;; The Egyptian Hieroglyph Format Controls were introduced in Unicode ;; Standard v12.0. Apparently, they are not yet well supported in -- 2.39.2