Subject: bug#56789: 28.1.90; Emoji composition problems with Harfbuzz 5.0.1-1

From: Eli Zaretskii <[email-masked]>
Date: Wed, 27 Jul 2022 14:37:38 +0300

> Cc: [email-masked]
> Date: Wed, 27 Jul 2022 09:01:15 +0000
> From: Simon Pugnet <[email-masked]>
> 
> > I installed this and then hb-view started working. The output was as
> > I'd expect: a properly composed image. I restarted Emacs however the
> > same problem persists. Perhaps I need to rebuild Emacs so I'll try
> > that in a bit.
> >
> > If that fixes it then it looks like the Arch harfbuzz package now
> > depends on chafa, however it is not listed as a dependency. That
> > would
> > then be a bug with the Arch packaging I think.
> >
> > Thanks for your help!
> 
> Following up on this, rebuilding Emacs didn't help. I also used
> LD_DEBUG while running Emacs and I cannot see any reference to chafa,
> so perhaps that was only a dependency for hb-view and not harfbuzz
> itself? I also looked through the LD_DEBUG output and I couldn't see
> anything that looked like a problem (e.g. missing harfbuzz symbols).

In your build, Cairo is also used, so maybe this is a Cairo problem,
or something between HarfBuzz and Cairo.  Or maybe the font you are
using causes this; did you try to upgrade to the latest version of
Noto Color Emoji?

This part of the "C-u C-x ="s output:

		display: composed to form "👩‍❤️‍👨" (see below)

  Composed with the following character(s) "‍❤️‍👨" using this font:
    ftcrhb:-GOOG-Noto Color
    Emoji-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1
  by these glyphs:
    [0 5 128105 2178 16 0 17 13 4 [0 0 0]]
  with these character(s):
    ‍ (#x200d) ZERO WIDTH JOINER
    ❤ (#x2764) HEAVY BLACK HEART
    ️ (#xfe0f) VARIATION SELECTOR-16
    ‍ (#x200d) ZERO WIDTH JOINER
    👨 (#x1f468) MAN

means that Emacs did recognize a composable sequence, and did pass it
all to HarfBuzz for shaping.  What happens next is entirely up to
HarfBuzz, the font, and Cairo.