From: Eli Zaretskii Date: Sat, 29 Jan 2022 19:22:02 +0000 (+0200) Subject: Fix rendering of Malayalam script X-Git-Tag: emacs-28.0.92~75 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ed3bbeb80db07d41747f0a046446ea3d3128c4bb;p=emacs.git Fix rendering of Malayalam script * lisp/language/indian.el (malayalam-composable-pattern): Remove. (script-regexp-alist): Remove 'malayalam-composable-pattern'. Instead, pass any sequence of Malayalam codepoints to the shaping engine. (Bug#53625) --- diff --git a/lisp/language/indian.el b/lisp/language/indian.el index 614d0767e72..971ecd7ca91 100644 --- a/lisp/language/indian.el +++ b/lisp/language/indian.el @@ -341,30 +341,6 @@ South Indian language Malayalam is supported in this language environment.")) table)) "Regexp matching a composable sequence of Kannada characters.") -(defconst malayalam-composable-pattern - (let ((table - '(("A" . "[\u0D02\u0D03]") ; SIGN ANUSVARA .. VISARGA - ("V" . "[\u0D05-\u0D14\u0D60\u0D61]") ; independent vowel - ("C" . "[\u0D15-\u0D39]") ; consonant - ("Y" . "[\u0D2F\u0D30\u0D32\u0D35]") ; YA, RA, LA, VA - ("v" . "[\u0D3E-\u0D4C\u0D57\u0D62\u0D63]") ; postbase matra - ("H" . "\u0D4D") ; SIGN VIRAMA - ("N" . "\u200C") ; ZWNJ - ("J" . "\u200D") ; ZWJ - ("X" . "[\u0D00-\u0D7F]")))) ; all coverage - (indian-compose-regexp - (concat - ;; consonant-based syllables, or - "C\\(?:J?HJ?C\\)*\\(?:H[NJ]?\\|v?A?\\)\\|" - ;; syllables with an independent vowel, or - "V\\(?:J?HY\\)?v*?A?\\|" - ;; special consonant form, or - "JHY\\|" - ;; any other singleton characters - "X") - table)) - "Regexp matching a composable sequence of Malayalam characters.") - (let ((script-regexp-alist `((devanagari . ,devanagari-composable-pattern) (bengali . ,bengali-composable-pattern) @@ -373,8 +349,7 @@ South Indian language Malayalam is supported in this language environment.")) (oriya . ,oriya-composable-pattern) (tamil . ,tamil-composable-pattern) (telugu . ,telugu-composable-pattern) - (kannada . ,kannada-composable-pattern) - (malayalam . ,malayalam-composable-pattern)))) + (kannada . ,kannada-composable-pattern)))) (map-char-table #'(lambda (key val) (let ((slot (assq val script-regexp-alist))) @@ -384,6 +359,11 @@ South Indian language Malayalam is supported in this language environment.")) (list (vector (cdr slot) 0 #'font-shape-gstring)))))) char-script-table)) +;; Malayalam: pass any sequence of characters to the shaping engine. +(set-char-table-range composition-function-table '(#x0D00 . #x0D7F) + `([,(purecopy "[\u0D00-\u0D7F]+") + 0 font-shape-gstring])) + (provide 'indian) ;;; indian.el ends here