From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20140: 24.4; M17n shaper output rejected Date: Sun, 13 Feb 2022 18:04:11 +0200 Message-ID: <831r06rbwk.fsf@gnu.org> References: <20150318222040.4066e6e9@JRWUBU2> <87r18jk5nr.fsf@gnus.org> <83v8xv2icg.fsf@gnu.org> <20220205225251.08a0faab@JRWUBU2> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19281"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 20140@debbugs.gnu.org, larsi@gnus.org To: Richard Wordingham Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 13 17:05:29 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJHNQ-0004r7-IO for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Feb 2022 17:05:28 +0100 Original-Received: from localhost ([::1]:60082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJHNO-0007KX-OK for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Feb 2022 11:05:26 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJHN0-0007KO-NV for bug-gnu-emacs@gnu.org; Sun, 13 Feb 2022 11:05:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44881) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJHN0-0001VK-Do for bug-gnu-emacs@gnu.org; Sun, 13 Feb 2022 11:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nJHN0-0000kq-3g for bug-gnu-emacs@gnu.org; Sun, 13 Feb 2022 11:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Feb 2022 16:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20140 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 20140-submit@debbugs.gnu.org id=B20140.16447682662848 (code B ref 20140); Sun, 13 Feb 2022 16:05:02 +0000 Original-Received: (at 20140) by debbugs.gnu.org; 13 Feb 2022 16:04:26 +0000 Original-Received: from localhost ([127.0.0.1]:38778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJHMQ-0000js-BM for submit@debbugs.gnu.org; Sun, 13 Feb 2022 11:04:26 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJHML-0000jb-Lc for 20140@debbugs.gnu.org; Sun, 13 Feb 2022 11:04:25 -0500 Original-Received: from [2001:470:142:3::e] (port=37292 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJHMF-0001Qr-Mx; Sun, 13 Feb 2022 11:04:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=GK4VQDUQbczDthPh+b5Ao10AsarOn0JjGif/Lbl1TY0=; b=PQwMUUwwDJn/ 3+rrkoUlIQTzlUDiQr+OCOzjenzr5n2X+oN/Nq4wstgDO7iTeuakqYQC5zJbbcsOR1ccbOMSEykzD nTObPb2MZ7yHVFDwIUDB7U+I2JssHGyDyakOvZhFFfsNpIXd0rslqNIMGuUKRxkP0rJPWFKoRTPOg 4oq2tx2NEXjkAOQt0W+VvQCJ/xfTcXMBjycoW0bmJkzulkV4p88c5JEPUpvv3FmIoOZGaHYWIKTZs QJLIqzyyabYzwRUIQyaA7vz0fvoj92/GiN4fzYg+wLRIf5slNDWb0zftXKJ9hBuSj24XJCxQjoAy3 5Ic0h/aiEBstsF5+NYSK8A==; Original-Received: from [87.69.77.57] (port=2182 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJHME-0002H5-Sz; Sun, 13 Feb 2022 11:04:15 -0500 In-Reply-To: <20220205225251.08a0faab@JRWUBU2> (message from Richard Wordingham on Sat, 5 Feb 2022 22:52:51 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:226817 Archived-At: > Date: Sat, 5 Feb 2022 22:52:51 +0000 > From: Richard Wordingham > Cc: Lars Ingebrigtsen , 20140@debbugs.gnu.org > > You're welcome to include my composition rules. Thanks. I started with your code: > (defvar tai-tham-composable-pattern > (let ((table > ;; C is letters, independent vowels, digits, punctuation and symbols. > '(("C" . "[\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD]") > ("M" . "[\u1A55-\u1A57\u1A59-\u1A5E\u1A61-\u1A7C\u1A7F]"); Mark > ("H" . "\u1A60") ; sakot > ("S" . "[\u1A75-\u1A7C]") ; Marks commuting with sakot > ("N" . "\u1A58"))) ; mai kang lai > (basic_syllable "C\\(N*\\(M\\|HS*C\\)\\)*") > (regexp "X\\(N\\(X\\)?\\)*H?")) ; X is basic syllable > (let ((case-fold-search nil)) > (setq regexp (replace-regexp-in-string "X" basic_syllable regexp t t)) > (dolist (elt table) > (setq regexp (replace-regexp-in-string (car elt) (cdr elt) > regexp t t)))) > regexp)) > > (let ((elt (list (vector tai-tham-composable-pattern 0 'font-shape-gstring) > (vector "." 0 'font-shape-gstring) > ))) > (set-char-table-range composition-function-table '(#x1A20 . #x1AAD) elt)) But that didn't seem to work well enough: e.g., some marks in your "sample text" didn't combine with letters, as I think they should. Then I tried this simplistic setting: (set-char-table-range composition-function-table '(#x1a20 . #x1aaf) (list (vector "[\u1a20-\u1aaf]+" 0 'font-shape-gstring))) and it worked much better, including passing a small number of the tests from your renderer test page that I threw on Emacs. This is on MS-Windows with Emacs 29 and HarfBuzz 2.4.0 (which is not even the latest release of HarfBuzz), and with the A Tai Tham KH New V3 font. Any reason not to use the above simple setup for Tai Tham text composition? I needed a couple more additions to Emacs to make Tai Tham support work OOTB: for example, script-representative-chars lacked an entry for Tai Tham, and the default fontset needed an addition. (And on MS-Windows, one needs to run the w32-find-non-USB-fonts magic once, to notice the newly installed Tai Tham font.) Other than that, assuming the above setting of composition-function-table is okay, we are ready to officially add Tai Tham to scripts supported by Emacs. Btw, is there a way to get all the examples from your https://wrdingham.co.uk/lanna/renderer_test.htm as a UTF-8 encoded text file? I'd like to test the Emacs rendering with all of the examples, but copy-pasting each example separately from the browser is not my idea of useful time investment. So if you could provide the examples as a downloadable text file, I'd appreciate.