Subject: Re: bug#61290: 28.2; Ligatures messing up fontify subscripts in AUCTeX

From: Eli Zaretskii <[email-masked]>
Date: Sun, 05 Feb 2023 10:58:58 +0200

> From: Jeremy Van Cleve <[email-masked]>
> Date: Sat, 4 Feb 2023 17:48:53 -0500
> 
> After loading emacs 28.2 with `emacs -Q` and installing AUCTeX, I enable
> ligatures (using FiraCode) and get the following fontify issues in a latex-mode:
> 
> https://preview.redd.it/se7joc3h81ga1.png?width=1268&format=png&auto=webp&v=enabled&s=1322e80f7d7b0799858041dd1c9b4f44ea51fbb2
> 
> Specifically, fontify is changing the font size correctly in the
> subscripts, but the baseline is not correct in a number of places
> include for + and * and when for x_{-}.
> 
> Without the ligatures enabled, fontify renders the subscripts correctly:
> 
> https://preview.redd.it/8g67r6lp81ga1.png?width=1358&format=png&auto=webp&v=enabled&s=3132a756de6a8266f8300e600b6d0dae94656ee9

Thanks.

My guess would be that the method used by AUCTeX for displaying
subscripts is somehow incompatible with character compositions.  How
are subscripts displayed by AUCTeX?

OTOH, if this is a problem in the Emacs display engine, I'd appreciate
a simple reproducer that doesn't require AUCTeX to be installed and
used.

CC'ing Tassilo, in case he has some comments and idea.