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#39799: 28.0.50; Most emoji sequences =?UTF-8?Q?don=E2=80=99t?= render correctly Date: Tue, 21 Sep 2021 19:23:41 +0300 Message-ID: <83fstxyk1e.fsf@gnu.org> References: <83lfongp4p.fsf@gnu.org> <835zfrglu5.fsf@gnu.org> <83wo86g8pg.fsf@gnu.org> <83h7zafzwh.fsf@gnu.org> <838skmfox6.fsf@gnu.org> <87h7efhtiz.fsf@gmail.com> <83zgs6xhqs.fsf@gnu.org> <87o88mgkj5.fsf@gmail.com> <83tuiexeky.fsf@gnu.org> <87k0jaghlb.fsf@gmail.com> <83mto6xb84.fsf@gnu.org> <87a6k6gfay.fsf@gmail.com> <83ilytyl75.fsf@gnu.org> <875yuthptu.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9516"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rgm@gnu.org, 39799@debbugs.gnu.org, mfabian@redhat.com To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 21 18:24:24 2021 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 1mSiZE-0002F7-HU for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Sep 2021 18:24:24 +0200 Original-Received: from localhost ([::1]:43626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSiZC-0005L4-ET for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Sep 2021 12:24:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSiYt-0005Jv-C2 for bug-gnu-emacs@gnu.org; Tue, 21 Sep 2021 12:24:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36107) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSiYs-0006wk-4X for bug-gnu-emacs@gnu.org; Tue, 21 Sep 2021 12:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mSiYr-0000wl-SG for bug-gnu-emacs@gnu.org; Tue, 21 Sep 2021 12:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Sep 2021 16:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39799 X-GNU-PR-Package: emacs Original-Received: via spool by 39799-submit@debbugs.gnu.org id=B39799.16322414363623 (code B ref 39799); Tue, 21 Sep 2021 16:24:01 +0000 Original-Received: (at 39799) by debbugs.gnu.org; 21 Sep 2021 16:23:56 +0000 Original-Received: from localhost ([127.0.0.1]:47652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSiYm-0000wN-0W for submit@debbugs.gnu.org; Tue, 21 Sep 2021 12:23:56 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSiYk-0000w7-7r for 39799@debbugs.gnu.org; Tue, 21 Sep 2021 12:23:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57586) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSiYe-0006nW-Tr; Tue, 21 Sep 2021 12:23:48 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1078 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 1mSiYe-0007qm-Ed; Tue, 21 Sep 2021 12:23:48 -0400 In-Reply-To: <875yuthptu.fsf@gmail.com> (message from Robert Pluim on Tue, 21 Sep 2021 18:10:37 +0200) 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:214992 Archived-At: > From: Robert Pluim > Cc: mfabian@redhat.com, rgm@gnu.org, 39799@debbugs.gnu.org > Date: Tue, 21 Sep 2021 18:10:37 +0200 > > >>>>> On Tue, 21 Sep 2021 18:58:38 +0300, Eli Zaretskii said: > > >> Because for skin tones we index on the modifier, and use lookback: > >> > >> ;; Skin tones > >> (set-char-table-range composition-function-table > >> '(#x1F3FB . #x1F3FF) > >> (nconc (char-table-range composition-function-table '(#x1F3FB . #x1F3FF)) > >> (list (vector ".[\U0001F3FB-\U0001F3FF]" > >> 1 > >> 'compose-gstring-for-graphic)))) > > Eli> Ah, okay. But why isn't that working? > > I have no idea. Even a single entry for U+1F469 in > composition-function-table in emoji-zwj.el messes things up. This rang a bell, so I looked around. And sure enough, there's this subtlety documented in the doc string of composition-function-table: The element at index C in the table, if non-nil, is a list of composition rules of the form ([PATTERN PREV-CHARS FUNC] ...); the rules must be specified in the descending order of PREV-CHARS ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ values. ^^^^^^ (I could find the code which enforces this, if necessary, but I clearly remember bumping into this in misc-lang.el, with Arabic composition rules, which is when I added the above to documentation.) And emoji-zwj.el doesn't adhere to this condition. If you reorder the rules as required above, does the problem go away (I cannot test this myself, as I don't have access to a system where color Emoji work in Emacs)? > Eli> Are you debugging this, or would you like me to take a look? > > Iʼd appreciate it if you have time. Itʼs not code Iʼm very familiar > with (and someone asked me to implement VS-16 based composition, so > Iʼm busy :-) ) If the above doesn't work, I will dig more.