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

From: Yixuan Chen <[email-masked]>
Date: Sun, 27 Oct 2024 16:32:34 -0400

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.

> you will need to show some code which generates such a situation in a reproducible manner

The same script I submitted in this bug.

"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
In case you want to know what the face12 is,
> Face: face12 (sample) (customize this face)
> 
> Documentation:
> Not documented as a face.
> 
> 
>            Family: unspecified
>           Foundry: unspecified
>             Width: unspecified
>            Height: 125
>            Weight: medium
>             Slant: italic
>        Foreground: unspecified
> DistantForeground: unspecified
>        Background: unspecified
>         Underline: unspecified
>          Overline: unspecified
>    Strike-through: unspecified
>               Box: unspecified
>           Inverse: unspecified
>           Stipple: unspecified
>              Font: unspecified
>           Fontset: unspecified
>            Extend: unspecified
>           Inherit: unspecified
and here's the result of "C-x C-u =":
>              position: 1277 of 3527 (36%), column: 34
>             character: > (displayed as >) (codepoint 62, #o76, #x3e)
>               charset: ascii (ASCII (ISO646 IRV))
> code point in charset: 0x3E
>                script: latin
>                syntax: _ 	which means: symbol
>              category: .:Base, a:ASCII, l:Latin, r:Roman
>              to input: type "C-x 8 RET 3e" or "C-x 8 RET GREATER-THAN SIGN"
>           buffer code: #x3E
>             file code: #x3E (encoded by coding system utf-8-unix)
>               display: by this font (glyph code):
>     ftcrhb:-SAJA-Cascadia Code-regular-italic-normal-*-17-*-*-*-m-0-iso10646-1 (#x3AC)
> 
> Character code properties: customize what to show
>   name: GREATER-THAN SIGN
>   general-category: Sm (Symbol, Math)
>   decomposition: (62) ('>')
> 
> There are text properties here:
>   face                 (face12 font-lock-string-face)
>   fontified            t

In a separate fresh new emacs window, I execute the following command:

     (set-face-attribute 'default nil :weight 'medium :slant 'italic 
:height 125)

"screenshot2.png" shows how it looks this time (the normal display).

the result of "describe-text-properties":
> There are text properties here:
>   face                 font-lock-string-face
>   fontified            nil
and "C-u C-x =":
>              position: 1277 of 3527 (36%), column: 34
>             character: > (displayed as >) (codepoint 62, #o76, #x3e)
>               charset: ascii (ASCII (ISO646 IRV))
> code point in charset: 0x3E
>                script: latin
>                syntax: _ 	which means: symbol
>              category: .:Base, a:ASCII, l:Latin, r:Roman
>              to input: type "C-x 8 RET 3e" or "C-x 8 RET GREATER-THAN SIGN"
>           buffer code: #x3E
>             file code: #x3E (encoded by coding system utf-8-unix)
>               display: by this font (glyph code):
>     ftcrhb:-SAJA-Cascadia Code-regular-italic-normal-*-17-*-*-*-m-0-iso10646-1 (#x3AC)
> 
> Character code properties: customize what to show
>   name: GREATER-THAN SIGN
>   general-category: Sm (Symbol, Math)
>   decomposition: (62) ('>')
> 
> There are text properties here:
>   face                 font-lock-string-face
>   fontified            t

If you want more information, I will keep both emacs window open for the 
next two hours.