all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 63731@debbugs.gnu.org, steven@stebalien.com
Subject: bug#63731: [PATCH] Support Emoji Variation Sequence 16 (FE0F) where appropriate
Date: Tue, 30 May 2023 15:30:58 +0200	[thread overview]
Message-ID: <87a5xmaqul.fsf@gmail.com> (raw)
In-Reply-To: <83ttvuf29m.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 30 May 2023 15:10:45 +0300")

[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]

>>>>> On Tue, 30 May 2023 15:10:45 +0300, Eli Zaretskii <eliz@gnu.org> said:

    Eli> Which means it _is_ composed.  Moreover, with Noto Color Emoji we get
    Eli> a single glyph.  On my system, I have Noto Emoji, from which I get two
    Eli> glyphs:

    Eli>   [0 1 128077 422 17 1 15 12 2 nil]
    Eli>   [0 1 65039 3 17 0 1 0 1 [0 0 0]]

    Eli> (in which case I can understand why the second one is displayed as a
    Eli> hex box if I customize glyphless-char-display-control).

But I also get a hex box if I customize
glyphless-char-display-control, even though 'C-u C-x =' claims thereʼs
only one glyph.

    Eli> So, given that this is the case, why is this wrong, again?  If the
    Eli> font and the shaper produce two glyphs, or one glyph that looks like
    Eli> two, why should we think it's an Emacs's problem?

Because Emacs behaves differently depending on whether we have a
composition rule for FE0F that looks backwards or one for 1F44D that
looks forwards. The sequence in both cases is

U+1F44D U+FE0F U+7C U+61
U+1F44D U+7C U+61

(set-char-table-range
 composition-function-table
 #xFE0F
 '(["\\c.\ufe0f" 1 font-shape-gstring]))

produces the following:


[-- Attachment #2: backward-composition.png --]
[-- Type: image/png, Size: 7288 bytes --]

[-- Attachment #3: Type: text/plain, Size: 411 bytes --]


There is a (very) thin space that shouldnʼt be there between the 1f44d
and the '|' on the line that has the FE0F (and since it follows the
value of glyphless-char-display-control, I donʼt think
it comes from the shaping engine).

but

(set-char-table-range
 composition-function-table
 #x1F44D 
'(["\U0001f44d\ufe0f" 0 font-shape-gstring]))

gives me this, where the two '|' align perfectly.


[-- Attachment #4: forward-composition.png --]
[-- Type: image/png, Size: 7224 bytes --]

[-- Attachment #5: Type: text/plain, Size: 140 bytes --]


(as an experiment, I hacked 'produce_glyphless_glyph' to skip
displaying variation selectors, and the problem disappears).

thanks

Robert

  reply	other threads:[~2023-05-30 13:30 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26  3:18 bug#63731: [PATCH] Support Emoji Variation Sequence 16 (FE0F) where appropriate Steven Allen
2023-05-26  6:41 ` Eli Zaretskii
2023-05-26  8:34   ` Robert Pluim
2023-05-26  8:46     ` Eli Zaretskii
2023-05-26 11:14       ` Robert Pluim
2023-05-26 12:06         ` Eli Zaretskii
2023-05-26 14:02           ` Robert Pluim
2023-05-26 14:55             ` Eli Zaretskii
2023-05-26 15:25               ` Robert Pluim
2023-05-26 15:52                 ` Eli Zaretskii
2023-05-26 16:24                   ` Robert Pluim
2023-05-26 17:27                     ` Eli Zaretskii
2023-05-26 17:35                       ` Robert Pluim
2023-05-26 18:05                         ` Eli Zaretskii
2023-05-28 11:43                           ` Robert Pluim
2023-05-28 12:44                             ` Eli Zaretskii
2023-05-26 17:43                       ` Eli Zaretskii
2023-05-28 10:29                         ` Robert Pluim
2023-05-28 12:37                           ` Eli Zaretskii
2023-05-28 11:57                       ` Robert Pluim
2023-05-28 12:47                         ` Eli Zaretskii
2023-05-29 10:44                           ` Robert Pluim
2023-05-29 13:58                             ` Eli Zaretskii
2023-05-29 14:43                               ` Robert Pluim
2023-05-29 14:55                                 ` Eli Zaretskii
2023-05-29 16:13                                   ` Robert Pluim
2023-05-29 17:18                                     ` Eli Zaretskii
2023-05-30  7:25                                       ` Robert Pluim
2023-05-30 12:10                                         ` Eli Zaretskii
2023-05-30 13:30                                           ` Robert Pluim [this message]
2023-05-30 16:32                                             ` Eli Zaretskii
2023-05-31 16:11                                               ` Robert Pluim
2023-05-31 16:18                                                 ` Eli Zaretskii
2023-06-01 12:43                                                   ` Eli Zaretskii
2023-06-01 13:30                                                     ` Robert Pluim
2023-06-01 16:10                                                       ` Eli Zaretskii
2023-06-01 16:34                                                         ` Robert Pluim
2023-06-02  8:15                                                           ` Robert Pluim
2023-06-02 12:06                                                             ` Eli Zaretskii
2023-06-02 12:25                                                               ` Robert Pluim
2023-06-02 12:58                                                                 ` Eli Zaretskii
2023-06-02 13:58                                                                   ` Robert Pluim
2023-06-03  5:36                                                                     ` Eli Zaretskii
2023-06-05 13:08                                                                       ` Robert Pluim
2023-06-05 13:12                                                                         ` Eli Zaretskii
2023-06-05 13:31                                                                           ` Eli Zaretskii
2023-06-05 14:06                                                                             ` Robert Pluim
2023-06-05 13:36                                                                           ` Robert Pluim
2023-06-05 13:47                                                                             ` Eli Zaretskii
2023-06-05 14:27                                                                               ` Robert Pluim
2023-06-05 15:35                                                                                 ` Eli Zaretskii
2023-06-05 15:57                                                                                   ` Robert Pluim
2023-06-05 16:20                                                                                     ` Robert Pluim
2023-06-05 16:41                                                                                       ` Eli Zaretskii
2023-06-06  7:24                                                                                         ` Robert Pluim
2023-06-05 16:39                                                                                     ` Eli Zaretskii
2023-06-06  7:28                                                                                       ` Robert Pluim
2023-06-06 11:53                                                                                         ` Eli Zaretskii
2023-05-26 15:06   ` Steven Allen
2023-05-26 15:29     ` Robert Pluim
2023-05-26 16:03       ` Steven Allen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a5xmaqul.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=63731@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=steven@stebalien.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.