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)
This commit is contained in:
parent
5ef3a52342
commit
ed3bbeb80d
1 changed files with 6 additions and 26 deletions
|
@ -341,30 +341,6 @@ South Indian language Malayalam is supported in this language environment."))
|
||||||
table))
|
table))
|
||||||
"Regexp matching a composable sequence of Kannada characters.")
|
"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
|
(let ((script-regexp-alist
|
||||||
`((devanagari . ,devanagari-composable-pattern)
|
`((devanagari . ,devanagari-composable-pattern)
|
||||||
(bengali . ,bengali-composable-pattern)
|
(bengali . ,bengali-composable-pattern)
|
||||||
|
@ -373,8 +349,7 @@ South Indian language Malayalam is supported in this language environment."))
|
||||||
(oriya . ,oriya-composable-pattern)
|
(oriya . ,oriya-composable-pattern)
|
||||||
(tamil . ,tamil-composable-pattern)
|
(tamil . ,tamil-composable-pattern)
|
||||||
(telugu . ,telugu-composable-pattern)
|
(telugu . ,telugu-composable-pattern)
|
||||||
(kannada . ,kannada-composable-pattern)
|
(kannada . ,kannada-composable-pattern))))
|
||||||
(malayalam . ,malayalam-composable-pattern))))
|
|
||||||
(map-char-table
|
(map-char-table
|
||||||
#'(lambda (key val)
|
#'(lambda (key val)
|
||||||
(let ((slot (assq val script-regexp-alist)))
|
(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))))))
|
(list (vector (cdr slot) 0 #'font-shape-gstring))))))
|
||||||
char-script-table))
|
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)
|
(provide 'indian)
|
||||||
|
|
||||||
;;; indian.el ends here
|
;;; indian.el ends here
|
||||||
|
|
Loading…
Add table
Reference in a new issue