From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#63731: [PATCH] Support Emoji Variation Sequence 16 (FE0F) where appropriate Date: Sun, 28 May 2023 13:57:49 +0200 Message-ID: <87h6rw8y82.fsf@gmail.com> References: <87a5xrzsph.fsf@stebalien.com> <83pm6nlhll.fsf@gnu.org> <87v8gfmqyt.fsf@gmail.com> <83ilcflbua.fsf@gnu.org> <87mt1rmjjg.fsf@gmail.com> <83v8gfjnzj.fsf@gnu.org> <87edn3mbr3.fsf@gmail.com> <83mt1rjg69.fsf@gnu.org> <875y8fm7x7.fsf@gmail.com> <83lehbjdjd.fsf@gnu.org> <87wn0vkqn1.fsf@gmail.com> <83jzwvj94x.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32721"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63731@debbugs.gnu.org, steven@stebalien.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 28 13:58:09 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 1q3F2H-0008Jp-2B for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 May 2023 13:58:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3F2C-0003MV-EH; Sun, 28 May 2023 07:58:04 -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 1q3F2A-0003MM-SA for bug-gnu-emacs@gnu.org; Sun, 28 May 2023 07:58:02 -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 1q3F2A-0006Py-JE for bug-gnu-emacs@gnu.org; Sun, 28 May 2023 07:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q3F2A-0007mb-FI for bug-gnu-emacs@gnu.org; Sun, 28 May 2023 07:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 May 2023 11:58: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.168527507829906 (code B ref 63731); Sun, 28 May 2023 11:58:02 +0000 Original-Received: (at 63731) by debbugs.gnu.org; 28 May 2023 11:57:58 +0000 Original-Received: from localhost ([127.0.0.1]:53401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3F26-0007mI-FL for submit@debbugs.gnu.org; Sun, 28 May 2023 07:57:58 -0400 Original-Received: from mail-wm1-f44.google.com ([209.85.128.44]:54515) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3F25-0007ly-08 for 63731@debbugs.gnu.org; Sun, 28 May 2023 07:57:57 -0400 Original-Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-3f611ccd06eso15397015e9.0 for <63731@debbugs.gnu.org>; Sun, 28 May 2023 04:57:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685275071; x=1687867071; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/dtEYAbs9WfLC4lbePijmuKfENBsS/PhT1RNaHnzx08=; b=TmwUDTt/uJsYdPsqB0zwEw7R7Hm2ehm3MpVm1KTYJ3m4MChRgFa1fVI+PV6jOPvVsc aOudF8G5u30FEEf90WmDCCq+RpeD8pqT8VPnadFD59J5m/uDAzfKv4iTMJmHuwHJn5MS /1FEGyz6ABxN5ZdKhkxZiKH2u7+uxVRn4mrC3pzz6taKy8ifQFb7zNyTr0Z34F7n5z6Y AQ1aCngAsadtY3T1oUWdSZjScV4EsNpdBoXoqgXZ5LggjLg90xGazEgLi3g0gVXr22Zg 0VMV/xZvw6jcuwqyUHkgKPFauWQBRpH8oLkiqHcohV08KTpF2ZK7JndJ3ZduhohKM5PS n9Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685275071; x=1687867071; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/dtEYAbs9WfLC4lbePijmuKfENBsS/PhT1RNaHnzx08=; b=fhpMyKp2w67KpXlEulJQmZM86KgwXbNPLnoVLq7WvOHCyGuZ8YNYAZOTx7usC7p/S3 Fn6CMKxMvWhuc5hi4UpHxxXhEvRhaWTdrOyOajA5eqnuVFzTEDxxrteAMMFq2vbWceJ1 e8DXMp4eVatgJF1ujyb8M69VVJaV7XC3pjMs3rx2IHsdLnf4BYSVslPRn/RIhndwqTvW AiAsrRMqqyA7l2FYZKd46sC7bpyCRI/1L513kfGngw53tCvPwmEBbKu78g5YOlTpBuXW EDU3Us53WVJU87CV4AdewMri24fsKKSu6Lc+QGVMaBvLd8Sgcf/8sV8iiOnjywyzY/D5 tiug== X-Gm-Message-State: AC+VfDxrwVqxq5PqdbYTfPQmWtD+cW6eye9YHziGSYp0ZldryDwwAJCN Wsee3ZYh0ajDSffp0CB1yW32sHpuwzA= X-Google-Smtp-Source: ACHHUZ4enaMeu/CZ4P+2SKOpmTqNRye1MCfifhp0MV+t8Rb350StkUC2GqbAOIBMNhuLInIIzWjj1w== X-Received: by 2002:a7b:c858:0:b0:3f4:fc5e:fbf2 with SMTP id c24-20020a7bc858000000b003f4fc5efbf2mr6546863wml.8.1685275070797; Sun, 28 May 2023 04:57:50 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id k10-20020a7bc40a000000b003f606869603sm14554251wmi.6.2023.05.28.04.57.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 04:57:50 -0700 (PDT) In-Reply-To: <83jzwvj94x.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 26 May 2023 20:27:26 +0300") 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:262531 Archived-At: >>>>> On Fri, 26 May 2023 20:27:26 +0300, Eli Zaretskii said: >>=20 >> It=CA=BCs a change to the VS-16 entry. We did discuss it before, and >> decided to put it aside because the solutions all involved adding >> composition-function-table entries for 0-9 or similar. I don=CA=BCt >> remember why we didn=CA=BCt consider adding to VS-16=CA=BCs entry. >>=20 >> I=CA=BCll do some more testing, and post a final version hopefully t= his >> weekend sometime. Eli> OK, thanks. Eli, if the 20e3 changes are too much for emacs-29, I can put them in master. I=CA=BCll put some notes in admin/notes/unicode as well. diff --git c/admin/unidata/emoji-zwj.awk i/admin/unidata/emoji-zwj.awk index 7d2ff6cb900..0b6f1267205 100644 --- c/admin/unidata/emoji-zwj.awk +++ i/admin/unidata/emoji-zwj.awk @@ -82,6 +82,7 @@ END { trigger_codepoints[11] =3D "1F574" trigger_codepoints[12] =3D "1F575" trigger_codepoints[13] =3D "1F590" + trigger_codepoints[14] =3D "20E3" =20 printf "(setq auto-composition-emoji-eligible-codepoints\n" printf "'(" diff --git c/lisp/composite.el i/lisp/composite.el index fb8b76114f4..acba4e73c17 100644 --- c/lisp/composite.el +++ i/lisp/composite.el @@ -762,6 +762,23 @@ compose-gstring-for-dotted-circle (if (memq val '(Mn Mc Me)) (set-char-table-range composition-function-table key elt))) unicode-category-table)) + ;; for Emoji presentation selector + ;; We don't want the generic nil 0 entry because it causes display + ;; of an extra box for FE0F. (Bug#63731) + ;; This also covers the fully-qualified enclosing keycap case. + (set-char-table-range + composition-function-table + #xFE0E + `([,(purecopy "\\c.\ufe0e") 1 compose-gstring-for-graphic])) + (set-char-table-range + composition-function-table + #xFE0F + `([,(purecopy "\\c.\ufe0f\u20e3?") 1 compose-gstring-for-graphic])) + ;; for unqualified enclosing keycap + (set-char-table-range + composition-function-table + #x20E3 + `([,(purecopy "[#*0-9]\u20e3") 1 compose-gstring-for-graphic])) ;; for dotted-circle (aset composition-function-table #x25CC `([,(purecopy ".\\c^") 0 compose-gstring-for-dotted-circle])) @@ -857,11 +874,10 @@ compose-gstring-for-variation-glyph ;; taken care of by font_range in font.c, which will check for an ;; emoji font for codepoints used in compositions even if they're not ;; emoji themselves, and thus choose the Emoji presentation for them -;; when followed by VS-16. VS-15 *is* handled here, because if it's -;; handled in font_range, we end up choosing the Emoji presentation -;; rather than the Text presentation. +;; when followed by VS-16. VS-15 is handled by the setup around +;; unicode-category-table above. (let ((elt '([".." 1 compose-gstring-for-variation-glyph]))) - (set-char-table-range composition-function-table '(#xFE00 . #xFE0E) elt) + (set-char-table-range composition-function-table '(#xFE00 . #xFE0D) elt) (set-char-table-range composition-function-table '(#xE0100 . #xE01EF) el= t)) =20 (defun auto-compose-chars (func from to font-object string direction) Robert --=20