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: Fri, 26 May 2023 16:02:40 +0200 Message-ID: <87edn3mbr3.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> 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="6279"; 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 Fri May 26 16:03:33 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 1q2Y2X-0001O8-HF for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 May 2023 16:03:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2Y25-0007nJ-It; Fri, 26 May 2023 10:03:05 -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 1q2Y22-0007mQ-Tj for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 10:03:03 -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 1q2Y22-0000Rf-L5 for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 10:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q2Y22-00082Y-3s for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 10:03: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: Fri, 26 May 2023 14:03: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.168510977030885 (code B ref 63731); Fri, 26 May 2023 14:03:02 +0000 Original-Received: (at 63731) by debbugs.gnu.org; 26 May 2023 14:02:50 +0000 Original-Received: from localhost ([127.0.0.1]:50483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2Y1q-000825-C2 for submit@debbugs.gnu.org; Fri, 26 May 2023 10:02:50 -0400 Original-Received: from mail-wr1-f48.google.com ([209.85.221.48]:51391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2Y1o-00081n-Ss for 63731@debbugs.gnu.org; Fri, 26 May 2023 10:02:49 -0400 Original-Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-30addbb1b14so164555f8f.2 for <63731@debbugs.gnu.org>; Fri, 26 May 2023 07:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685109763; x=1687701763; 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=Up5VhkNjbc07hWmrw3mQxvyTpfou5Gs6fOPICIcqots=; b=jtThnbjiwH/WClcIwonYrgfcPp8Z10cQzU/AeONFGvp/mdZ+95EHc2763pGYLfklD4 +BTEh5zHpDR9GuSqu0keBrTIJONw/e7A5c3mFBGsGX7aXISOzaeOcgbQu39DrT+W5D70 267N8MaQfVQbHJ95boYo84qD26xGNI5k+3EYwnMpJ49qglTL1xJnEbaWSakmo+p+vUo/ 31SKmP2LX3+LkE6k2Z1yozV0rbYcWcYPLs2xOkvT1BlbXMAn+Cu2TMXWqz7VyebKe/Oo I1TQ/E5nqpSZx8tNM8WA44p5qGRWw7UVKN3mzfgQQw3H82DgDJO/5aVAmJCbWMJNGinZ gdgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685109763; x=1687701763; 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=Up5VhkNjbc07hWmrw3mQxvyTpfou5Gs6fOPICIcqots=; b=cObPXeK4Y6qAG2GtcsnufcjaVt4B2Y7puleADoq+V5hx9LPws/t2MN6/s7PT5MS1i8 hQUIp2UaVK6x9HqMniyRtlNdI+rDlp3D18KK6PVmXuHMMoiUavt854ZZwPMY5q5ARxjj 5G9l2WMoM83RzMtTVQLYu0ALnXUS9C8u+zSQhNNcYL8EZTDRpxUuqga1rruP2I61YZtD L2Q6A+ojYa/HY85FZHSdGdclxOyd1/YNc57fOgBAlZP0k3sURJkq8OYr2wsX8taBX3X0 +j537774jyZ46DwlRIPCV0vCDx6HViK0GjHXhm9QjDbZSdnM+EWrrMYsexxYzPMWax9T CEdA== X-Gm-Message-State: AC+VfDxSDmZt1Fx8z8E/L76pO3RDZgVtQMEr/RhgCsdd5HUwWoo31Pml Z/FP9Ojh208lVTzEt0pov2Gas8ZvwNk= X-Google-Smtp-Source: ACHHUZ71g26ZWdp5NG4E5Bj3dEdYyiXe2QBgIAWls5+DNsQr1itRc0jd0Q+hotTNabwQU+4lwwHuUA== X-Received: by 2002:adf:d089:0:b0:306:3a47:cd78 with SMTP id y9-20020adfd089000000b003063a47cd78mr1302977wrh.71.1685109762338; Fri, 26 May 2023 07:02:42 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id c3-20020a05600c0ac300b003f50e88ffc1sm9028824wmr.0.2023.05.26.07.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 07:02:41 -0700 (PDT) In-Reply-To: <83v8gfjnzj.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 26 May 2023 15:06:40 +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:262435 Archived-At: >>>>> On Fri, 26 May 2023 15:06:40 +0300, Eli Zaretskii said: >> From: Robert Pluim >>=20 >> Composition is done for 1f44d+fe0f, but I suspect that with the curr= ent >> setup, composition is called again for FE0F, which results in the box >> glyph. With the second patch we will only do backwards looking compo= sition >> for FE0F Eli> OK, then I think we should install this on the emacs-29 branch. >> You=CA=BCre right, there=CA=BCs no forward looking regexp, only a ba= ckwards one >> and a no-regexp. But it=CA=BCs undeniable that: >>=20 >> [nil 0 compose-gstring-for-graphic] >>=20 >> causes the issue. I=CA=BCve never been clear on the semantics of tha= t. Eli> It has special support in compose-gstring-for-graphic, see there. = The Eli> doc string also says a few words about that. We use this, e.g., in Eli> describe-char display, where we sometimes need to show a single Eli> combining character with no base character to combine it with. I Eli> think this is only relevant for accents and other such combining Eli> characters, not for VS-n. OK Eli> What does this issue mean for the other VS-n characters, though? Eli> Should we perhaps install something similar for them as well? For VS-15 maybe? The following gets me text-presentation composition with CHAR+FE0E and emoji-presentation with CHAR+FE0F diff --git a/lisp/composite.el b/lisp/composite.el index fb8b76114f4..ada35010146 100644 --- a/lisp/composite.el +++ b/lisp/composite.el @@ -762,6 +762,11 @@ 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 + (set-char-table-range + composition-function-table + '(#xFE0E . #xFE0F) + `([,(purecopy "\\c.[\ufe0f\ufe0e]") 1 compose-gstring-for-graphic])) ;; for dotted-circle (aset composition-function-table #x25CC `([,(purecopy ".\\c^") 0 compose-gstring-for-dotted-circle])) @@ -861,7 +866,7 @@ compose-gstring-for-variation-glyph ;; handled in font_range, we end up choosing the Emoji presentation ;; rather than the Text presentation. (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) although perhaps we could have both `compose-gstring-for-graphic' and `compose-gstring-for-variation-glyph' for FE0E Robert --=20