Subject: Re: bug#63271: 29.0.90; broken mouse-face

From: Po Lu <[email-masked]>
Date: Wed, 10 May 2023 08:34:56 +0800

Stephen Berman <[email-masked]> writes:

> On Tue, 09 May 2023 16:35:50 +0300 Eli Zaretskii <[email-masked]> wrote:
>
>>> From: Stephen Berman <[email-masked]>
>>> Cc: Eli Zaretskii <[email-masked]>,  [email-masked],  [email-masked]
>>> Date: Tue, 09 May 2023 15:12:06 +0200
>>>
>>> On Tue, 09 May 2023 20:52:24 +0800 Po Lu <[email-masked]> wrote:
>>>
>>> > What if you change the font driver in use to something else, like X?
>>> > i.e.
>>> >
>>> >   (set-frame-parameter (selected-frame) 'font-backend "x")
>>>
>>> With that the highlighting problem in fundamental-mode vanishes: all
>>> problematic strings show mouse-highlighting. (FTR, with the "x"
>>> font-backend, the default face here is displayed with adobe-courier and
>>> variable-pitch face is displayed with adobe-helvetica.)
>>
>> Does changing the font backend also changes the font used for the
>> variable-pitch face?  If it does, then perhaps you could force Emacs
>> to use the same font by customizing the variable-pitch face?  Since we
>> already know that the font somehow affects this issue, we need to try
>> to use the same font with different backends, to be sure it's the
>> backend that counts, not the font.
>
> As I noted previously, here with ftcrhb variable-pitch face is displayed
> with DejaVu Sans.  When I change the font-backend to "x", variable-pitch
> face is displayed with adobe-helvetica, as noted, but when I change its
> Font Family attribute to DejaVu Sans, the "TODO" string in
> fundamental-mode, propertized to inherit variable-pitch, is displayed
> with adobe-times.  So it seems that DejaVu Sans cannot be used by the x
> font-backend.
>
> Steve Berman

X doesn't support the same fonts that Cairo does.  But does the same
thing happen if you use a build with Xft (i.e. --without-cairo), with
the same font?