Subject: bug#44020: 28.0.50; Prefer selection of colour emoji fonts?

From: Robert Pluim <[email-masked]>
Date: Mon, 19 Oct 2020 20:34:41 +0200

>>>>> On Mon, 19 Oct 2020 17:55:55 +0300, Eli Zaretskii <[email-masked]> said:

    >> From: Robert Pluim <[email-masked]>
    >> Cc: [email-masked],  Eli Zaretskii <[email-masked]>
    >> Date: Mon, 19 Oct 2020 12:56:33 +0200
    >> 
    >> So revisiting this, it turns out I have *two* features sitting in my workspace:
    >> 
    >> 1. splitting out the emoji into a separate script and setting the right
    >> fontset
    >> 2. adding composition rules for the zwj emoji described in
    >> emoji-zwj-sequences.txt
    >> 
    >> [2] has some complications regarding the default display of the
    >> variation-selector, so Iʼll leave that aside for now, and continue on
    >> updating [1] to Unicode 13.0

    Eli> Thanks.

    Eli> Can you summarize the problems with [2]?  I thought we had all of that
    Eli> figured out back when we discussed this.

Perhaps we did: I have no clear memory of what we decided, so Iʼll
have to go and re-read it.

Iʼm attaching a gzipped patch for emoji support (it contains the
entire emoji-data.txt from Unicode 13.0 🙂), which works for me on
macOS when I do

(set-fontset-font t 'emoji '("Apple Color Emoji . "iso1064601") nil
'prepend)

It *should* work as-is on GNU/Linux, but for some reason Emacs is
completely refusing to use any Emoji fonts for me there. Itʼs possible
Iʼve messed up my system somehow, since emacs-27 has the same issue,
but Iʼm seeing some very suspicious results from
ftcrfont_glyph_extents (the font average width is always 0), so perhaps
we need to adjust our font code.

Testing appreciated.

Robert
--