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: emacs-devel@gnu.org
Subject: Re: Better emoji support
Date: Fri, 17 Sep 2021 18:43:01 +0200	[thread overview]
Message-ID: <87tuijm9uy.fsf@gmail.com> (raw)
In-Reply-To: <875yuzciaf.fsf@gmail.com> ("Kévin Le Gouguec"'s message of "Fri, 17 Sep 2021 17:51:04 +0200")

>>>>> On Fri, 17 Sep 2021 17:51:04 +0200, Kévin Le Gouguec <kevin.legouguec@gmail.com> said:

    Kévin> Hi Robert, thanks for this!
    Kévin> I've tried your changes out and they work mostly as I expected; I'm
    Kévin> observing something I can't quite explain though, I don't know if this
    Kévin> behaviour is intended or not:

    Kévin> With emacs -Q, M-x check-emoji-coverage "Noto Color Emoji" initially
    Kévin> yields this:

    >> #*0©®↔▶◀☎♀♂♠♣♥♨🛝🟰🥹🧌🩻🪩🪷🫃🫗🫠🫰

Thatʼs what I see here

    Kévin> With an init file that sets font-use-system-font to t, I get:

    >> #*0©®‼⁉↔↩⌚⌨Ⓜ▪▶◀◻☀☂☄☎☑☝☠☢☦☪☮☯☸☺♀♂♈♟♠♣♥♨♻✂✈✒✔✖✝✡✳❄❇❣❤➡🛝🟰🥹🧌🩻🪩🪷🫃🫗🫠🫰

Hmm, I donʼt know why font-use-system-font would affect things
here. Which font is used instead of Noto Color Emoji?

    Kévin> In both cases, if I then run:

    >> (set-fontset-font t 'emoji "Noto Color Emoji" nil 'prepend)

    Kévin> and re-run check-emoji-coverage, I get this:

    >> #*0©®🛝🟰🥹🧌🩻🪩🪷🫃🫗🫠🫰

Thatʼs even more suprising. Maybe the set-fontset-font in
setup-default-fontset needs to be moved slightly later, Iʼll run some
experiments. <time passes> Yes, the emoji font spec was slightly too
early. Can you try the patch below?


    Kévin> … which is what I would expect (i.e. mostly Unicode 14 codepoints which
    Kévin> are not covered yet).

    Kévin> I see that fontset.el specifies FONT-SPEC as '("Noto Color Emoji"
    Kévin> . "iso10646-1"), but I don't see why that should discriminate against
    Kévin> any Unicode character?

It doesnʼt, but order matters when defining fontsets.

    Kévin> Again, thanks for making Emoji easier to tweak in Emacs.

It only took me a year :-) Thanks for testing

Robert
-- 


diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index 13c998a41a..4ec641dca8 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -896,9 +896,6 @@ setup-default-fontset
              (#x1FA00 . #x1FA6F)))	;; Chess Symbols
     (set-fontset-font "fontset-default" symbol-subgroup
                       '("Symbola" . "iso10646-1") nil 'prepend))
-  ;; This sets up the Emoji codepoints to use prettier fonts.
-  (set-fontset-font "fontset-default" 'emoji
-                    '("Noto Color Emoji" . "iso10646-1") nil 'prepend)
   ;; Box Drawing and Block Elements
   (set-fontset-font "fontset-default" '(#x2500 . #x259F)
                     '("FreeMono" . "iso10646-1") nil 'prepend)
@@ -927,6 +924,9 @@ setup-default-fontset
     (set-fontset-font "fontset-default" symbol-subgroup
                       "-*-fixed-medium-*-*-*-*-*-*-*-*-*-iso10646-1"
                       nil 'prepend))
+  ;; This sets up the Emoji codepoints to use prettier fonts.
+  (set-fontset-font "fontset-default" 'emoji
+                    '("Noto Color Emoji" . "iso10646-1") nil 'prepend)
 
   ;; Append CJK fonts for characters other than han, kana, cjk-misc.
   ;; Append fonts for scripts whose name is also a charset name.

  reply	other threads:[~2021-09-17 16:43 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 [this message]
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
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=87tuijm9uy.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=kevin.legouguec@gmail.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 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).