[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A question about emojis - like \N{HEAVY BLACK HEART}
From: |
Eduardo Ochs |
Subject: |
Re: A question about emojis - like \N{HEAVY BLACK HEART} |
Date: |
Sat, 4 Feb 2023 06:00:41 -0300 |
On Sat, 4 Feb 2023 at 03:51, Eli Zaretskii <eliz@gnu.org> wrote:
>
> 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.
Hi Eli! Perfect, thanks! =)
Here is the fixed code, with the u+FE0F in two different syntaxes:
(defun find-estring-mini (string)
(switch-to-buffer "*string*")
(kill-region (point-min) (point-max))
(insert string))
(defun my-emojis ()
(interactive)
(find-estring-mini "
Slightly smiling face: \N{SLIGHTLY SMILING FACE}
Slightly frowning face: \N{SLIGHTLY FROWNING FACE}
Face without mouth: \N{FACE WITHOUT MOUTH}
Neutral face: \N{NEUTRAL FACE}
Upside-down face: \N{UPSIDE-DOWN FACE}
Confused face: \N{CONFUSED FACE}
Flushed face: \N{FLUSHED FACE}
Grimacing face: \N{GRIMACING FACE}
Thumbs up sign: \N{THUMBS UP SIGN}
Dog face: \N{DOG FACE}
Pile of poo: \N{PILE OF POO}
Japanese ogre: \N{JAPANESE OGRE}
Thinking face: \N{THINKING FACE}
Face with stuck-out...: \N{FACE WITH STUCK-OUT TONGUE}
Grinning face with...: \N{GRINNING FACE WITH ONE LARGE AND ONE SMALL EYE}
Face with stuck-out...: \N{FACE WITH STUCK-OUT TONGUE AND
TIGHTLY-CLOSED EYES}
Crying face: \N{CRYING FACE}
Disappointed but...: \N{DISAPPOINTED BUT RELIEVED FACE}
Loudly crying face: \N{LOUDLY CRYING FACE}
Face screaming in fear: \N{FACE SCREAMING IN FEAR}
Confounded face: \N{CONFOUNDED FACE}
Angry face: \N{ANGRY FACE}
Pouting face: \N{POUTING FACE}
Serious face with...: \N{SERIOUS FACE WITH SYMBOLS COVERING MOUTH}
Orange heart: \N{ORANGE HEART}
Yellow heart: \N{YELLOW HEART}
Green heart: \N{GREEN HEART}
Blue heart: \N{BLUE HEART}
Purple heart: \N{PURPLE HEART}
Brown heart: \N{BROWN HEART}
Heavy black heart: \N{HEAVY BLACK HEART}\N{VARIATION SELECTOR-16}
White frowning face: \N{WHITE FROWNING FACE}\uFE0F
"))
Cheers,
Eduardo