all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* A question about emojis - like \N{HEAVY BLACK HEART}
@ 2023-02-04  2:15 Eduardo Ochs
  2023-02-04  6:50 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Eduardo Ochs @ 2023-02-04  2:15 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-04  9:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-04  2:15 A question about emojis - like \N{HEAVY BLACK HEART} Eduardo Ochs
2023-02-04  6:50 ` Eli Zaretskii
2023-02-04  9:00   ` Eduardo Ochs

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.