bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57072: [BUG] update-glyphless-char-display and variation selectors


From: Eli Zaretskii
Subject: bug#57072: [BUG] update-glyphless-char-display and variation selectors
Date: Tue, 09 Aug 2022 19:23:59 +0300

> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]