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

From: Yixuan Chen <[email-masked]>
Date: Mon, 28 Oct 2024 10:47:43 -0400

Also, this morning someone mentioned on the github issue I linked above 
stating that he/she encountered a similar problem, and switching from 
cairo to Xft fixed the problem. I don't know if it's related, but you 
might want to know.

I use wayland myself and xwayland doesn't support fractional scaling, so 
that's not a feasible solution for me.

On 10/28/24 10:44, Yixuan Chen wrote:
> 
> 
> On 10/28/24 10:25, Eli Zaretskii wrote:
>>> Date: Sun, 27 Oct 2024 16:32:34 -0400
>>> Cc: [email-masked], [email-masked], [email-masked]
>>> From: Yixuan Chen <[email-masked]>
>>>
>>> On 10/27/24 16:07, Eli Zaretskii wrote:
>>>> To convince me that this is really happening (although I'm unable to
>>>> understand how it could, given how Emacs faces work), you will need to
>>>> show some code which generates such a situation in a reproducible
>>>> manner, and then show me by using "M-x describe-text-properties" and
>>>> "C-u C-x =" that indeed the same characters in the same face are shown
>>>> on different lines with different metrics.
>>>
>>> OK, here you go.
>>
>> Not exactly what I asked for, or understood how the problem manifests
>> itself...
>>
>>> "screenshot1.png" shows the bugged display. Here's the result of
>>> "describe-text-properties",
>>>> There are text properties here:
>>>>    face                 (face12 font-lock-string-face)
>>>>    fontified            t
>>
>> But this is a completely different issue.  There's no indentation
>> here, right? You are saying that in the "bad" display there's some
>> extra space between the ligature and the following quote, right?
> 
> Maybe my use of words were terrible. The problem I want to report was 
> never about indentation. It was always about the "extra space between 
> the ligature and the following character" (and sometimes also some extra 
> space between the ligature and the character, although not in this 
> instance).
> 
>> Is
>> that extra space a real SPC glyph or is it just that the ligature is
>> considered "wider"?  What happens if you put the cursor on the ▷
>> ligature in the "bad" display -- does the block cursor then take up
>> all the space up to the next quote?
> 
> It's not a real SPC glyph. It's a single character ▷ (or ligature/glyph 
> I should call it? the underlying text is "|||>"). I attached five 
> screenshots, where the block cursor is at ", |, |, |, >, " respectively. 
> Noticeably, the block cursor for the first | character (1_bar.png) is 
> extra wide, and the block cursors for the following characters looks 
> offset from where they are.