unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Axel Svensson <svenssonaxel@gmail.com>
Cc: 57072@debbugs.gnu.org
Subject: bug#57072: [BUG] update-glyphless-char-display and variation selectors
Date: Tue, 09 Aug 2022 19:23:59 +0300	[thread overview]
Message-ID: <83zggdtmg0.fsf@gnu.org> (raw)
In-Reply-To: <CAJ40yazh2uaaZPK=beRtMx8FLpZ03doLa7NoyvQiOVQDKL80og@mail.gmail.com> (message from Axel Svensson on Tue, 9 Aug 2022 16:56:37 +0200)

> From: Axel Svensson <svenssonaxel@gmail.com>
> 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.





  reply	other threads:[~2022-08-09 16:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09  8:38 bug#57072: [BUG] update-glyphless-char-display and variation selectors Axel Svensson
2022-08-09  8:40 ` bug#57073: " Axel Svensson
2022-08-09 11:36 ` bug#57072: " Eli Zaretskii
2022-08-09 14:56   ` Axel Svensson
2022-08-09 16:23     ` Eli Zaretskii [this message]
2022-08-09 20:33       ` Axel Svensson
2022-08-10 13:10         ` Eli Zaretskii
2022-08-16 11:55           ` Robert Pluim
2022-08-16 12:01             ` Eli Zaretskii
2022-08-11 14:01     ` Eli Zaretskii
2022-08-11 14:58       ` Axel Svensson
2022-08-11 16:19         ` Eli Zaretskii
2022-08-12  3:33           ` Axel Svensson
2022-08-12  5:53             ` Eli Zaretskii
2022-08-12  6:50               ` Axel Svensson
2022-08-12  7:10                 ` Eli Zaretskii
2022-08-12  7:57                   ` Axel Svensson
2022-08-12 10:29                     ` Eli Zaretskii
2022-08-12 11:51                       ` Axel Svensson
2022-08-12 12:46                         ` Eli Zaretskii
2022-08-16  8:05                           ` Robert Pluim
2022-08-16 13:06                             ` Eli Zaretskii
2022-08-16 13:27                               ` Robert Pluim
2022-08-16 13:39                                 ` Axel Svensson
2022-08-16 14:48                                   ` Robert Pluim
2022-08-16 16:27                                     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83zggdtmg0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=57072@debbugs.gnu.org \
    --cc=svenssonaxel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).