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

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

Re: A question about emojis - like \N{HEAVY BLACK HEART}


From: Eli Zaretskii
Subject: Re: A question about emojis - like \N{HEAVY BLACK HEART}
Date: Sat, 04 Feb 2023 08:50:52 +0200

> From: Eduardo Ochs <eduardoochs@gmail.com>
> Date: Fri, 3 Feb 2023 23:15:50 -0300
> 
>   Heavy black heart:        (E2)(9D)(A4)
>   White frowning face:      (E2)(98)(B9)
> 
> This _may be_ the reason why "\N{HEAVY BLACK HEART}" and
> "\N{WHITE FROWNING FACE}" are generating uglier versions of
> the emojis.

What is? what do you see in the last 2 sequences which tells you that
they should display differently?

> What's the recommended way to fix this?

Append u+FE0F to each one of those.

These characters are not by default considered Emoji, because that's
what Unicode says about them.  If you evaluate, for example,

   M-: (aref char-script-table ?❤) RET

you will see that it yields 'symbol', not 'emoji'.  To ask Emacs to
display the Emoji appearance of these two characters, you must follow
them with u+FE0F.  The other characters yield 'emoji' from the above
expression, so they are displayed as Emoji by default.

The reason for this behavior is that many symbol characters have dual
purpose, both as "normal" symbol and as Emoji, and we don't want them
to display as Emoji by default, which will surprise and perhaps annoy
when this happens in plain text.  Emacs behaves here as Unicode
mandates, by displaying each symbol according to its default
appearance, and by supporting the alternate appearance when the
character sequence requests that.



reply via email to

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