Subject: Re: bug#77151: 31.0.50; >>= is not rendered

From: Eli Zaretskii <[email-masked]>
Date: Tue, 25 Mar 2025 17:08:19 +0200

> Date: Mon, 24 Mar 2025 14:37:14 +0100
> Cc: [email-masked]
> From: Mattias Roux <[email-masked]>
> 
> Thanks for the thorough report :-)
> 
> I raised the issue on the FiraCode repository and here's the answer:
> 
> Considering that it works literally everywhere else, it probably has something to do with Emacs
> 
> https://fonts.google.com/specimen/Fira+Code?preview.text=%3E%3E%3D

So I wanted to see if this is an Emacs problem or not.  I did two
things:

 . Tried the same in the Command Prompt of Windows 11, which on my
   system uses Cascadia Code font, which also supports these
   ligatures.  Lo and behold, it behaves the same: ">>=" produces
   something that doesn't look like a ligature (but if I watch
   carefully, I do see that when I type the second ">", the two ">>"
   together look differently than a single ">", so it's a different
   font glyph -- exactly like I saw in the output of
   find-composition).  And if I type ">>==", I get the ligature,
   exactly like in Emacs.

 . Invoked hb-view, the standalone shaping program that is part of
   HarfBuzz.  I invoked it like this:

     hb-view FiraCode-Regular.ttf --text=">>=" -o lig3.png -O png

   The resulting file lg3.png is attached.  You will see that it looks
   exactly like the "no-ligature" result in Emacs.  Then I tried the
   same with the 4-character sequence:

     hb-view FiraCode-Regular.ttf --text=">>==" -o lig4.png -O png

   The file lig4.png is also attached.  You will see that it shows the
   ligature, identical to what Emacs produces with these 4 characters.

So at this point I see no evidence that Emacs does anything wrong,
since the standalone HarfBuzz shaping program produces the same output
as what Emacs shows.  I wonder what am I missing, if indeed "every
other program does show the ligature" in the ">>=" case with the same
fonts.  Maybe the font developers could tell more about what other
applications do, since AFAIK they all use HarfBuzz.  Maybe they use
some optional features of the shaping?  (I tried to turn on kerning,
it didn't help.)