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

From: Eli Zaretskii <[email-masked]>
Date: Sun, 18 Oct 2020 18:02:18 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Sun, 18 Oct 2020 10:09:09 +0200
> 
> > Are you sure?  What exactly makes sure Emacs won't have any problems
> > in those cases?  For starters, does Emacs really know that a given
> > character belongs to "Emoji"?  And if it does, does it know how to
> > filter fonts that support Emoji?
> 
> I thought that Emacs looped through all the fonts on the system and
> checked whether the font had coverage for the character we wanted to
> display?

It does -- for some value of "check".  Opening a font and trying to
find a glyph for a character is expensive, so Emacs tries to avoid
that as much as possible.  Instead, it uses less expensive "checks"
that don't require actually opening the font.  The details are
somewhat complicated (and I'm not sure I have a sufficiently clear
picture of them, nor that we have someone on board who does), and the
are to some extent font-backend dependent, but they have to do with
the character's script, the script's characters in
script-representative-chars, and system APIs for finding fonts that
support those.  And the first problem with Emoji characters in this
context is that their script is 'symbol', which doesn't allow us to
assign an Emoji font to them as a script.