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#57072: [BUG] update-glyphless-char-display and variation selectors Date: Tue, 09 Aug 2022 19:23:59 +0300 Message-ID: <83zggdtmg0.fsf@gnu.org> References: <83edxpvec4.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20097"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57072@debbugs.gnu.org To: Axel Svensson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 09 18:25:19 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 1oLS2g-00058P-S8 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Aug 2022 18:25:18 +0200 Original-Received: from localhost ([::1]:58926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLS2e-0005uW-0w for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Aug 2022 12:25:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLS2R-0005rN-AD for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 12:25:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54878) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLS2Q-0003Ou-AY for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 12:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLS2P-0001U2-OD for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 12:25: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, 09 Aug 2022 16:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57072 X-GNU-PR-Package: emacs Original-Received: via spool by 57072-submit@debbugs.gnu.org id=B57072.16600622575643 (code B ref 57072); Tue, 09 Aug 2022 16:25:01 +0000 Original-Received: (at 57072) by debbugs.gnu.org; 9 Aug 2022 16:24:17 +0000 Original-Received: from localhost ([127.0.0.1]:44627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLS1h-0001Sw-1o for submit@debbugs.gnu.org; Tue, 09 Aug 2022 12:24:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLS1f-0001Sh-47 for 57072@debbugs.gnu.org; Tue, 09 Aug 2022 12:24:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41922) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLS1Z-0003EB-TO; Tue, 09 Aug 2022 12:24:09 -0400 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=P3uSH0tmsnzGhxmI3+Qt3cTy/JAFw42juWg8TdpJoRo=; b=qyCGtuRoda01 pDnfQ/bVDkBtyfhTBdHdaXz7dHWADvEFu11IQIqBe6TZsiCirCsus+bwxNQsySov664QOQcx36QDx e1wJOt59teXmUuIOv41Wpd02OflTRYxNirQeRz3O8n40Hs+QUUp6xOYvBc6oq80qo3VRWM1UEcmh4 ABMXpbheUWG3blrXtvNyPbV+gP/2AbGNsg8BCTiw81GtR2b7gzJVGecPSIsaCrqvkMquSR8s5y49s sz3+KA25PhoBpwL87jwyUPtEme2H0wwpenQLjyD3sHgCeq2ppL1w0atqkC2w0zbMmVW5GnpMb+h+t 5viTf3i9T+VEcUbkBvS5tg==; Original-Received: from [87.69.77.57] (port=4712 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 1oLS1Z-0004mQ-Cn; Tue, 09 Aug 2022 12:24:09 -0400 In-Reply-To: (message from Axel Svensson on Tue, 9 Aug 2022 16:56: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:239165 Archived-At: > From: Axel Svensson > Date: Tue, 9 Aug 2022 16:56:37 +0200 > Cc: 57072@debbugs.gnu.org > > See new patch attached. Thanks, I will review it soon. > To reproduce: > 1) Start emacs -Q under X11. > 2) Evaluate: > > (progn > (let ((vs-acronyms > '("VS01" "VS02" "VS03" "VS04" > "VS05" "VS06" "VS07" "VS08" > "VS09" "VS10" "VS11" "VS12" > "VS13" "VS14" "VS15" "VS16"))) > (dotimes (i 16) > (aset char-acronym-table (+ #xfe00 i) (car vs-acronyms)) > (setq vs-acronyms (cdr vs-acronyms)))) > (update-glyphless-char-display > 'glyphless-char-display-control > '((format-control . acronym) > (variation-selectors . acronym) > (no-font . hex-code))) > (insert #xfe00 #xfe01 #xfe0e #xfe0f)) > > Expected: > Four boxes are shown, all of which contain "VS" in the upper half, and in the lower half "01", "02", "15" and > "16" respectively. > > Actual: > The three first boxes appear as expected, but the fourth is empty. > > Througout the codebase, I see U+FE0F sometimes singled out and treated differently than the other variation > selectors, so this isn't entirely strange. > in places including: > - admin/unidata/emoji-data.txt:778 > - admin/unidata/emoji-zwj.awk:102 > - lisp/composite.el:856 This character (as any other character) will only be displayed using the glyphless-char-display setup if it is shown as a separate character. If it is composed with other surrounding characters, it will be shown as the font tells us to show that sequence, and in that case Emacs doesn't consult glyphless-char-display at all. Now, VS16 is almost always composed with preceding characters, so I think you can only see it as acronym if you deliberately force Emacs not to compose it, e.g. by preceding it with U+20DD COMBINING ENCLOSING CIRCLE, or precede it and follow it by U+200C ZERO WIDTH NON-JOINER, or disable auto-composition-mode.