Subject: bug#55319: 28.1.50; Abugida not rendered correctly (MacOS)

From: Robert Pluim <[email-masked]>
Date: Thu, 12 May 2022 10:36:29 +0200

>>>>> On Thu, 12 May 2022 16:26:49 +0800, Kai Ma <[email-masked]> said:
    Kai> Thanks. I’ve got it work.

    Kai> Besides the pattern problem, there were two missing pieces:
    Kai> (1) canonical-combining-class, and

Iʼm surprised you needed to override that, but composition has many
dark corners.

    Kai> (2) `compose-'  to actually compose it into one glyph. `font-shape-gstring' alone does not work.

    Kai> This is the result:

    Kai> (defun zbalermorna-setup ()
    Kai>   "Set up the composition rules for zbalermonrna."
    Kai>   (interactive)

    Kai>   (dolist (v (number-sequence #xeda0 #xeda9))
    Kai>     (put-char-code-property v 'canonical-combining-class (encode-composition-rule '(tc . bc))))

    Kai>   (let* ((c "\\([\uED80-\uED97]\\|\uEDAA\\|\uEDAB\\)")
    Kai>          (v "[\uEDA0-\uEDA9]")
    Kai>          (dot "\uED89")
    Kai>          (h "\uED8A")
    Kai>          (pattern1 (concat c v))
    Kai>          (pattern2 (concat v h v)))
    Kai>     (set-char-table-range
    Kai>      composition-function-table '(#xeda0 . #xeda9)
    Kai>      (list (vector pattern2 2 #'compose-gstring-for-graphic)
    Kai>            (vector pattern1 1 #'compose-gstring-for-graphic)
    Kai>            [nil 0 font-shape-gstring]))))

Eli, since these are PUA, can we still add them to Emacs?

Thanks

Robert
--