GNU bug report logs - #77151
31.0.50; >>= is not rendered

Previous Next

Package: emacs;

Reported by: Mattias Roux <mattias <at> kojin.tech>

Date: Fri, 21 Mar 2025 12:43:02 UTC

Severity: normal

Tags: notabug

Found in version 31.0.50

Full log


Message #22 received at 77151 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mattias Roux <mattias <at> kojin.tech>
Cc: 77151 <at> debbugs.gnu.org
Subject: Re: bug#77151: 31.0.50; >>= is not rendered
Date: Tue, 25 Mar 2025 17:08:19 +0200
[Message part 1 (text/plain, inline)]
> Date: Mon, 24 Mar 2025 14:37:14 +0100
> Cc: 77151 <at> debbugs.gnu.org
> From: Mattias Roux <mattias <at> kojin.tech>
> 
> 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.)

[lig3.png (image/png, attachment)]
[lig4.png (image/png, attachment)]

This bug report was last modified 76 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.