Subject: Re: bug#73752: 29.4; Ligatures are randomly rendered with extra spaces

From: Eli Zaretskii <[email-masked]>
Date: Sun, 27 Oct 2024 19:19:48 +0200

> From: Visuwesh <[email-masked]>
> Cc: Yixuan Chen <[email-masked]>,  Po Lu <[email-masked]>,
>   [email-masked]
> Date: Sun, 27 Oct 2024 21:49:32 +0530
> 
> [ஞாயிறு அக்டோபர் 27, 2024] Eli Zaretskii wrote:
> 
> > Ping!  Unless someone can debug this, I'm going to close this bug as
> > unreproducible.
> 
> I can reproduce this with Cascadia Code but it took a lot more than "5
> seconds."  I see no extra spaces but I see misalignment, it is not as
> bad as it was reported in
> 
>     https://github.com/mickeynp/ligature.el/issues/56
> 
> by others.  I tried it with JetBrains Mono but failed to reproduce.  I
> have a suspicion that it might be related to bug#54646 where I face(d) a
> similar issue with Tamil text.  FWIW, I experienced a similar
> misalignment (exactly) once with Julia Mono for the sequence
> 
>     LATIN SMALL LETTER A (a) + COMBINING CIRCUMFLEX ACCENT
> 
> where the accent was a little off to the side.  Since I run Emacs as a
> daemon, closing all GUI frames and opening a fresh new one made the
> misalignment go away.
> 
> I am attaching two images "good.png" and "misaligned.png" to illustrate
> the issue.  [ I hope the images aren't too big.  ]

It's quite clear from the image that the "misaligned" line uses a font
with a different slant/weight/height value.  If that is the reason, I
guess the problem is with composition caching, but why is that an
issue in real life?  Do real-life Lisp programs modify face font
attributes so frequently?