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#63731: [PATCH] Support Emoji Variation Sequence 16 (FE0F) where appropriate Date: Fri, 26 May 2023 09:41:42 +0300 Message-ID: <83pm6nlhll.fsf@gnu.org> References: <87a5xrzsph.fsf@stebalien.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="11033"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63731@debbugs.gnu.org To: Steven Allen , Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 26 08:42:22 2023 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 1q2R9a-0002dq-O6 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 May 2023 08:42:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2R9N-0006vr-J3; Fri, 26 May 2023 02:42:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2R9H-0006tT-Qo for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 02:42:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2R9H-00043D-JW for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 02:42:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q2R9G-000744-8r for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 02:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 May 2023 06:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63731 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 63731-submit@debbugs.gnu.org id=B63731.168508327927102 (code B ref 63731); Fri, 26 May 2023 06:42:02 +0000 Original-Received: (at 63731) by debbugs.gnu.org; 26 May 2023 06:41:19 +0000 Original-Received: from localhost ([127.0.0.1]:48649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2R8Z-000733-4C for submit@debbugs.gnu.org; Fri, 26 May 2023 02:41:19 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2R8X-00072r-R0 for 63731@debbugs.gnu.org; Fri, 26 May 2023 02:41:18 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2R8S-0003sN-Cv; Fri, 26 May 2023 02:41:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=RnHIQvi3YvPQkmhSEPG3/s6zoDH3+W83Ok6LCbJPAvI=; b=qUspINXU7VUTdCiFh9YE 05j5xBHv9g5cdHQ+KLH8oIGwtzOm+N6UEZCA7YeMUbfHXP8b2GU6L8myQfpEEv/kSfin8z0QlmQTr CzFI6hmS+Ymw5wK/feXCGt9YN+ces3TRwbD1SJiHsttPVImduei2IjJYE1ZQR6ICKaBRD8GonC+8d JIa10yS5MQkFKsI20QFo/7jsAgENpWPNhbDevkMdg34M++K5BqJycwi6+Sjso/gFYzslOwlt82xwI azzsTEdbrWyh58KApRCdKP8pDw/eP1PzXNhkuON052IrpR0OIvfM13iPG4A5UBUUCRy31b/FrpZJ8 v+kveDv5NERo3w==; Original-Received: from [87.69.77.57] (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 1q2R8R-0007SE-SI; Fri, 26 May 2023 02:41:12 -0400 In-Reply-To: <87a5xrzsph.fsf@stebalien.com> (message from Steven Allen on Thu, 25 May 2023 20:18:02 -0700) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262408 Archived-At: > From: Steven Allen > Date: Thu, 25 May 2023 20:18:02 -0700 > > This patch imports the full list from unicode.org instead of > special-casing a few characters as was done previously. > > With this patch, '👍️' (1F44D FE0F) should look the same as '👍' (1F44D). > Without it, it will look like '👍‌️'. > > As a simple regression test, '✔' (2714) should still as "text" while '✔️' > (2714 FE0F) should still display as an emoji. > > Fixes https://github.com/alphapapa/ement.el/issues/137 > > NOTE: I'm not a Unicode expert, nor do I understand how Emacs handles > Unicode (beyond what was required to implement this patch). But this > patch appears to work and I can't find any regressions. AFAIU, this change will populate composition-function-table for many "normal" characters, including ASCII digits and symbol/punctuation characters from the 0x2xxx blocks. E.g., after you build Emacs with this patch, what do the following evaluations yield: M-: (aref composition-function-table ?0) RET M-: (aref composition-function-table #x2122) RET If they yield non-nil values, it could mean dramatic slowdown of redisplay with these characters. Which is precisely what we wanted to avoid when we made the decision which parts of the Unicode-defined Emoji sequences to support in Emacs, and how to arrange for that support to work. The issue you site is strange: according to the "C-u C-x =" display there, Emacs did compose #x1f44d with VS-16 using the Noto Color Emoji font, so I don't quite understand why VS-16 is then also shown as an empty rectangle. On my system Noto Color Emoji doesn't work, and "C-u C-x =" says this instead: Composed with the following character(s) "️" using this font: harfbuzz:-outline-Noto Emoji-regular-normal-normal-mono-15-*-*-*-c-*-iso10646-1 by these glyphs: [0 1 128077 422 19 2 17 14 2 nil] [0 1 65039 3 19 0 1 0 1 [0 0 0]] with these character(s): ️ (#xfe0f) VARIATION SELECTOR-16 which explains why I see two glyphs and not 1. But in the display shown in the above issue, I see Composed with the following character(s) "️" using this font: ftcrhb:-GOOG-Noto Color Emoji-regular-normal-normal-*-18-*-*-*-m-0-iso10646-1 by these glyphs: [0 1 128077 569 22 0 23 17 5 [0 0 136]] with these character(s): ️ (#xfe0f) VARIATION SELECTOR-16 which describes only one glyph, not two. So the result ought to be what you expect. Robert, what am I missing here?