unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
Cc: Jean-Christophe Helary <lists@traduction-libre.org>,
	Eli Zaretskii <eliz@gnu.org>, Juri Linkov <juri@linkov.net>,
	emacs-devel@gnu.org
Subject: Re: Better emoji support
Date: Sun, 19 Sep 2021 21:13:06 +0200	[thread overview]
Message-ID: <87a6k8l6pp.fsf@gmail.com> (raw)
In-Reply-To: <87mto8l95x.fsf@gmail.com> (Robert Pluim's message of "Sun, 19 Sep 2021 20:20:10 +0200")

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

>>>>> On Sun, 19 Sep 2021 20:20:10 +0200, Robert Pluim <rpluim@gmail.com> said:

>>>>> On Sun, 19 Sep 2021 19:16:45 +0200, Kévin Le Gouguec <kevin.legouguec@gmail.com> said:
    Kévin> Juri Linkov <juri@linkov.net> writes:
    >>> Thanks, this is a nice change.  I have a problem only with one character.
    >>> Displaying NORTH EAST ARROW ↗ with emoji font is inappropriate to me.
    >>> 
    >>> If adding this character to the emoji script was not a mistake,
    >>> is it possible to customize this to display such characters
    >>> as a symbol like before?

    Kévin> admin/unidata/emoji-data.txt contains a whole section where "omitted
    Kévin> code points have Emoji_Presentation=No", and AFAICT NORTH EAST ARROW
    Kévin> is one of those omitted code points.

    Robert> True. But it has the 'Emoji' property.

    Kévin> IIUC, the Unicode standard means for those omitted characters to display
    Kévin> as "text" rather than as "emoji", unless they are followed by a
    Kévin> variation selector[1]; maybe some adjustments in fontset.el are in
    Kévin> order?

Eli also pointed out that this should depend on the presence of the
variation selector. Iʼll add that to the work Iʼm doing on emoji ZWNJ
sequences anyway (although given that the selector and the codepoints
will likely be using different fonts, Iʼm not sure we'll be able to
achieve this)

    Robert> As "text presentation" rather than "emoji presentation", not as
    Robert> "text". If we want to follow the Emoji_Presentation property, thatʼs
    Robert> easy enough to arrange.

As per the attached. If itʼs all OK Iʼll push tomorrow.

Robert
-- 


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Base-emoji-script-membership-on-Emoji_Presentation.patch --]
[-- Type: text/x-diff, Size: 1922 bytes --]

From 3f7f622346f1c14bd5aa7e373e5f634a71b318ad Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim@gmail.com>
Date: Sun, 19 Sep 2021 21:07:36 +0200
Subject: [PATCH] Base emoji script membership on Emoji_Presentation
To: emacs-devel@gnu.org

The Emoji property describes which codepoints can be displayed as
emoji, but Emoji_Presentation governs which are displayed as emoji by
default.

* admin/notes/unicode: Adjust check-emoji-coverage to look in the
Emoji_Presentation sections of emoji-data.txt
* admin/unidata/blocks.awk: Assign emoji script using the
Emoji_Presentation section.
---
 admin/notes/unicode      | 2 +-
 admin/unidata/blocks.awk | 7 +------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/admin/notes/unicode b/admin/notes/unicode
index 9dc6f3bdca..0b2ce52794 100644
--- a/admin/notes/unicode
+++ b/admin/notes/unicode
@@ -100,7 +100,7 @@ FONT-NAME-REGEXP is checked using `string-match'."
 (save-excursion
 (goto-char (point-min))
 (let (res char name ifont)
-  (while (re-search-forward "; Emoji [^(]+(\\(.\\)[).\uFE0F]" nil t)
+  (while (re-search-forward "; Emoji_Presentation [^(]+(\\(.\\)[).]" nil t)
     (setq char (aref (match-string 1) 0))
     (setq ifont (car (internal-char-font nil char)))
     (when ifont
diff --git a/admin/unidata/blocks.awk b/admin/unidata/blocks.awk
index 6e52b52f67..29022bf7dd 100755
--- a/admin/unidata/blocks.awk
+++ b/admin/unidata/blocks.awk
@@ -202,12 +202,7 @@ FILENAME ~ "Blocks.txt" && /^[0-9A-F]/ {
     }
 }
 
-# The space after 'Emoji' is significant in the next two rules.
-# This purposely and deliberately excludes codepoints <= 00FF
-FILENAME ~ "emoji-data.txt" && /^00[0-9A-F][0-9A-F].*; Emoji / {
-    next
-}
-FILENAME ~ "emoji-data.txt" && /^[0-9A-F].*; Emoji / {
+FILENAME ~ "emoji-data.txt" && /^[0-9A-F].*; Emoji_Presentation / {
     sep = index($1, "..")
     len = length($1)
     if (sep > 0)  {
-- 
2.33.0.363.g4c719308ce


  reply	other threads:[~2021-09-19 19:13 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-10  9:19 Better emoji support Eli Zaretskii
2021-07-10  9:24 ` Robert Pluim
2021-07-10  9:37   ` Eli Zaretskii
2021-07-10  9:45     ` Robert Pluim
2021-07-10  9:48       ` Eli Zaretskii
2021-07-12  8:27         ` Robert Pluim
2021-07-12 14:02           ` Robert Pluim
2021-07-12 15:38             ` Robert Pluim
2021-07-12 15:59               ` Eli Zaretskii
2021-07-13  7:00                 ` Jean Louis
2021-07-13  7:50                   ` Robert Pluim
2021-07-15 15:15                 ` Robert Pluim
2021-07-15 15:44                   ` Eli Zaretskii
2021-09-13 12:36         ` Eli Zaretskii
2021-09-13 15:44           ` Robert Pluim
2021-09-13 16:07             ` Eli Zaretskii
2021-09-13 16:36             ` Jean-Christophe Helary
2021-09-17 13:01               ` Robert Pluim
2021-09-17 13:42                 ` Jean-Christophe Helary
2021-09-17 13:50                   ` Robert Pluim
2021-09-17 15:51                     ` Kévin Le Gouguec
2021-09-17 16:43                       ` Robert Pluim
2021-09-17 19:34                         ` Kévin Le Gouguec
2021-09-19 18:27                           ` Robert Pluim
2021-09-19 19:43                             ` Kévin Le Gouguec
2021-09-20  4:23                               ` Eli Zaretskii
2021-09-20  6:20                                 ` Kévin Le Gouguec
2021-09-20  6:53                                   ` Eli Zaretskii
2021-09-20  8:40                                     ` Robert Pluim
2021-09-20  9:53                                       ` Eli Zaretskii
2021-09-20 13:03                                         ` Robert Pluim
2021-09-20 13:15                                           ` Eli Zaretskii
2021-09-20 13:25                                             ` Eli Zaretskii
2021-09-20 13:50                                               ` Robert Pluim
2021-09-20 15:27                                                 ` Eli Zaretskii
2021-09-20 17:32                                                   ` Robert Pluim
2021-09-20 18:54                                                     ` Eli Zaretskii
2021-09-20 19:30                                                       ` Robert Pluim
2021-09-20 19:42                                                         ` Eli Zaretskii
2021-09-20 20:05                                                           ` Robert Pluim
2021-09-20 13:40                                             ` Robert Pluim
2021-09-20 13:45                                               ` Eli Zaretskii
2021-09-17 15:58                     ` Jean-Christophe Helary
2021-09-17 16:35                     ` Daniel Martín
2021-09-17 16:52                       ` Robert Pluim
2021-09-17 15:39                 ` Stephen Berman
2021-09-17 16:01                   ` Eli Zaretskii
2021-09-17 16:34                     ` Stephen Berman
2021-09-17 16:58                       ` Robert Pluim
2021-09-17 17:05                         ` Stephen Berman
2021-09-17 17:10                           ` Robert Pluim
2021-09-17 17:17                             ` Stephen Berman
2021-09-17 17:37                               ` Better emoji support, " Robert Pluim
2021-09-17 17:49                                 ` Stephen Berman
2021-09-17 17:51                                   ` Robert Pluim
2021-09-17 18:53                                     ` martin rudalics
2021-09-17 18:58                                       ` Robert Pluim
2021-09-17 19:44                                         ` Stephen Berman
2021-09-17 18:53                                 ` martin rudalics
2021-09-17 16:55                     ` martin rudalics
2021-09-17 18:48                 ` Eli Zaretskii
2021-09-17 18:59                   ` Robert Pluim
2021-09-18  5:39                     ` Eli Zaretskii
2021-09-18  6:25                 ` Eli Zaretskii
2021-09-19 16:09                 ` Juri Linkov
2021-09-19 17:16                   ` Kévin Le Gouguec
2021-09-19 18:20                     ` Robert Pluim
2021-09-19 19:13                       ` Robert Pluim [this message]
2021-09-19 17:24                   ` Eli Zaretskii
2021-09-19 18:10                     ` Robert Pluim
2021-09-19 18:29                       ` Eli Zaretskii
2021-09-19 18:40                         ` Robert Pluim
2021-09-19 18:34                       ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87a6k8l6pp.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --cc=kevin.legouguec@gmail.com \
    --cc=lists@traduction-libre.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).