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

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

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


From: Eduardo Ochs
Subject: A question about emojis - like \N{HEAVY BLACK HEART}
Date: Fri, 3 Feb 2023 23:15:50 -0300

Hi list,

I tried to write a function that would display the emojis that I use
more, and I did the obvious thing: I started with `M-x emoji-list',
then selected my favorite emojis, then I wrote some macros that would
obtain their names - `C-u C-x =' on an emoji displays its name, but I
used other tricks - and I produced the function `my-emojis' that
displays each emoji with its name:

  (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}
  White frowning face:      \N{WHITE FROWNING FACE}
    "))


It turns out that the last two emojis are displayed in a way that is
less nice than the other ones... here is a screenshot:

  https://i.ibb.co/ZdxN77r/sshot.png

Then I tried to save my temporary buffer with emojis to a file, and I
used a small Lua script to replace each character >127 in it with its
hex code, and got this:

  Slightly smiling face:    (F0)(9F)(99)(82)
  Slightly frowning face:   (F0)(9F)(99)(81)
  Face without mouth:       (F0)(9F)(98)(B6)
  Neutral face:             (F0)(9F)(98)(90)
  Upside-down face:         (F0)(9F)(99)(83)
  Confused face:            (F0)(9F)(98)(95)
  Flushed face:             (F0)(9F)(98)(B3)
  Grimacing face:           (F0)(9F)(98)(AC)
  Thumbs up sign:           (F0)(9F)(91)(8D)
  Dog face:                 (F0)(9F)(90)(B6)
  Pile of poo:              (F0)(9F)(92)(A9)
  Japanese ogre:            (F0)(9F)(91)(B9)
  Thinking face:            (F0)(9F)(A4)(94)
  Face with stuck-out...:   (F0)(9F)(98)(9B)
  Grinning face with...:    (F0)(9F)(A4)(AA)
  Face with stuck-out...:   (F0)(9F)(98)(9D)

  Crying face:              (F0)(9F)(98)(A2)
  Disappointed but...:      (F0)(9F)(98)(A5)
  Loudly crying face:       (F0)(9F)(98)(AD)
  Face screaming in fear:   (F0)(9F)(98)(B1)
  Confounded face:          (F0)(9F)(98)(96)
  Angry face:               (F0)(9F)(98)(A0)
  Pouting face:             (F0)(9F)(98)(A1)
  Serious face with...:     (F0)(9F)(A4)(AC)
  Orange heart:             (F0)(9F)(A7)(A1)
  Yellow heart:             (F0)(9F)(92)(9B)
  Green heart:              (F0)(9F)(92)(9A)
  Blue heart:               (F0)(9F)(92)(99)
  Purple heart:             (F0)(9F)(92)(9C)
  Brown heart:              (F0)(9F)(A4)(8E)

  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's the recommended way to fix this?
  Thanks in advance!
    Eduardo Ochs
    http://anggtwu.net/#eev
    http://anggtwu.net/eepitch.html



reply via email to

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