emacs-devel
[Top][All Lists]
Advanced

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

Re: Better emoji support


From: Robert Pluim
Subject: Re: Better emoji support
Date: Fri, 17 Sep 2021 18:43:01 +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 via email to

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