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

From: Yixuan Chen <[email-masked]>
Date: Sun, 27 Oct 2024 13:39:56 -0400

On 10/27/24 13:27, Eli Zaretskii wrote:
> Or maybe I don't understand the original problem.  The bug report says
> "extra spaces", but eacg font has its own metrics of the SPC glyph, so
> highlighting a line with a given face can affect the metrics of the
> whitespace.  Why is this surprising?  Or what did I miss?

The problem is that the "space" being rendered is different in the 
following two case:

- if the default font is set to a specific combination of attributes 
(say 16, bold, normal) from start, it renders all the characters with 
one version of spacing. Let's call this version of spacing the 
"expected" spacing,
- if the default font is some other combination of attributes (say 16, 
regular, normal), and one line is set to the attribute of (16, bold, 
normal). There is a **probability** that this line will render with a 
different version of spacing than the "expected" spacing. In my setup, 
this different spacing is extra wide.

Ultimately, I believe the following should be true: if one line is 
rendered with **the same font face attributes**, it should always be 
rendered in **the same way**, regardless when, where, and how its 
attributes are assigned. This is not the case for emacs right now, and 
thus I consider it a bug.