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

From: Simon Pugnet <[email-masked]>
Date: Wed, 27 Jul 2022 12:25:22 +0000

Hi Eli,

"Eli Zaretskii" <[email-masked]> writes:

>> Cc: [email-masked]
>> Date: Wed, 27 Jul 2022 09:01:15 +0000
>> From: Simon Pugnet <[email-masked]>
>>
>> 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?

I'm currently using the latest version of the font that is available
from the Arch Linux repositories. The last time this font was updated
on my system was 2022-06-22.

This issue was not present this morning with the same build of Emacs,
it only started after performing a system update which included this
new version of HarfBuzz.

Here's the pacman.log for this particular set of updates: -

 [2022-07-27T06:43:50+0100] [PACMAN] Running 'pacman --sync -y -u --'
 [2022-07-27T06:43:50+0100] [PACMAN] synchronizing package lists
 [2022-07-27T06:43:52+0100] [PACMAN] starting full system upgrade
 [2022-07-27T06:45:06+0100] [ALPM] running 'ghc-unregister.hook'...
 [2022-07-27T06:45:07+0100] [ALPM] transaction started
 [2022-07-27T06:45:07+0100] [ALPM] upgraded libcap (2.64-1 -> 2.65-1)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded iso-codes (4.10.0-1 ->
 4.11.0-1)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded harfbuzz (4.4.1-1 ->
 5.0.1-1)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded appstream-glib (0.7.18-2
 -> 0.8.0-1)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded firefox (102.0.1-1 ->
 103.0-1)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded harfbuzz-icu (4.4.1-1 ->
 5.0.1-1)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded haskell-githash
 (0.1.6.2-120 -> 0.1.6.2-121)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded haskell-hpack (0.34.7-4 ->
 0.34.7-5)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded haskell-optparse-simple
 (0.1.1.4-152 -> 0.1.1.4-153)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded haskell-pantry (0.5.6-2 ->
 0.5.6-3)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded haskell-th-expand-syns
 (0.4.9.0-37 -> 0.4.10.0-1)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded haskell-th-reify-many
 (0.1.10-53 -> 0.1.10-54)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded hwloc (2.7.1-1 -> 2.8.0-1)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded lib32-harfbuzz (4.4.1-1 ->
 5.0.1-1)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded lib32-libcap (2.64-1 ->
 2.65-1)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded libplacebo (4.192.1-3 ->
 4.208.0-1)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded libspiro (1:20200505-2 ->
 1:20220722-1)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded lv2 (1.18.4-2 -> 1.18.6-1)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded
 mobile-broadband-provider-info (20220511-1 -> 20220725-1)
 [2022-07-27T06:45:07+0100] [ALPM] upgraded protobuf (21.3-2 ->
 21.4-1)
 [2022-07-27T06:45:08+0100] [ALPM] upgraded pyright (1.1.263-1 ->
 1.1.264-1)
 [2022-07-27T06:45:08+0100] [ALPM] upgraded python-executing (0.9.0-1
 -> 0.9.1-1)
 [2022-07-27T06:45:08+0100] [ALPM] upgraded python-pip (22.1.2-1 ->
 22.2-1)
 [2022-07-27T06:45:08+0100] [ALPM] upgraded python-protobuf (21.3-2 ->
 21.4-1)
 [2022-07-27T06:45:08+0100] [ALPM] upgraded serd (0.30.12-2 ->
 0.30.14-1)
 [2022-07-27T06:45:08+0100] [ALPM] upgraded sord (0.16.10-2 ->
 0.16.12-3)
 [2022-07-27T06:45:08+0100] [ALPM] upgraded sratom (0.6.10-3 ->
 0.6.12-1)
 [2022-07-27T06:45:08+0100] [ALPM] upgraded stack (2.7.5-105 ->
 2.7.5-106)
 [2022-07-27T06:45:08+0100] [ALPM] upgraded vlc (3.0.17.4-6 ->
 3.0.17.4-7)
 [2022-07-27T06:45:08+0100] [ALPM] transaction completed
 [2022-07-27T06:45:08+0100] [ALPM] running '30-systemd-update.hook'...
 [2022-07-27T06:45:08+0100] [ALPM] running 'ghc-register.hook'...
 [2022-07-27T06:45:08+0100] [ALPM] running
 'gtk-update-icon-cache.hook'...
 [2022-07-27T06:45:08+0100] [ALPM] running
 'update-desktop-database.hook'...
 [2022-07-27T06:45:08+0100] [ALPM] running
 'update-vlc-plugin-cache.hook'...

> 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.

After installation of libchafa it looks like HarfBuzz is correctly
composing the sequence as evidenced by the output of the hb-view
command that Robert asked me to run earlier. So perhaps it is an issue
with Cairo. However I haven't updated this since 2022-04-06; it's
currently at version 1.17.6-2.

I will try recompiling Emacs without Cairo and I'll let you know what
happens.

Thanks for your help,

--
Simon Pugnet
https://www.polaris64.net/