Subject: bug#54970: 28.1; Some emoji no longer display

From: Eli Zaretskii <[email-masked]>
Date: Sat, 23 Apr 2022 19:58:21 +0300

> From: Howard Melman <[email-masked]>
> Date: Sat, 23 Apr 2022 12:35:47 -0400
> Cc: [email-masked]
> 
> I know the definition of the set of emojis is difficult but also that it
> doesn't overlap with the intuition of a user not steeped in Unicode. 
> Perhaps this is particularly bad on a mac where ACE is used 
> universally to render emoji and the system emoji picker (shared
> with iOS) includes as emoji many characters in both the emoji
> and symbol scripts.  And I understand that you don't want to include
> references to ACE in emacs.
> 
> I think I would have benefited from a describe-scripts command
> that some how showed what ranges these scripts cover in a way
> easier than using C-u C-x = for each character.  Or maybe a
> function scripts-used-in-region that returned a list of the scripts
> of each character.

These are all very complex technical issues, and I'm not sure the
right way of letting users customize Emacs in these respects is to
expose all that complexity and advertise it.  We should try finding
easier, more self-explanatory, customization means and options.

> I do think I and other mac users would benefit from a previously
> mentioned possibility of a setting handling those emoji who's default 
> rendering is text to either render as emoji or include them in
> the emoji script (instead of symbol).

Something to consider for the future, I guess.  Emacs 28 is the first
release to include a decent support for Emoji, and we are still
collecting user experience about what we have.

> I'm not really clear on categories in emacs.  Maybe an emoji
> category that included characters from both script emoji and
> some from script symbol and a way to use it to modify a
> fontset?  The Categories section of the elisp manual doesn't
> say where emacs uses them but I see them used in properties
> and regexps and an easy way to regexp search for any character
> in an emoji category would be nice.

Categories are used in regular expressions, but the way fontsets are
implemented, we cannot use categories for controlling font selection,
except very indirectly and unreliably via character composition rules
(which use regexps) -- and that will only affect composed sequences.

> Back to the original post in this bug, the NEWS instructions to:
>     (set-fontset-font t 'emoji '("My New Emoji Font" . "iso10646-1") nil 'prepend)
> confused me because it didn't seem to have any effect on macos.
> If this (or some other) instruction included "and you may want to do the same
> for the script symbol though it might include more characters you
> desire" it would have helped.  Particularly if it recommended
> this for mac users.  I don't see a mention of emoji in the emacs
> manual except in the antinews.  Perhaps it could mention that emacs
> by default knows to look for Noto Color Emoji or Symbola for
> many emoji characters and how systems without these fonts
> might be configured effectively.

NEWS describes what we think is the correct setup for Emoji.  I'm
still not convinced that telling users to customize the font for
'symbol' is a good idea, especially since we prefer symbols and
punctuation to be displayed by the default font as much as possible.
Maybe this contradicts what macOS users expect, but macOS is not the
main platform we want to support.

As for mentioning the fonts for which we set up by default -- there
are others in the default fontset, and I don't see why those two are
to be treated specially.  OTOH, mentioning all of them would be too
much, because there are many, and they differ by platforms.  We should
instead strive to make the default setup work seamlessly for everyone,
IMO.