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

From: Stephen Berman <[email-masked]>
Date: Mon, 08 May 2023 20:20:31 +0200

On Mon, 08 May 2023 19:14:46 +0300 Eli Zaretskii <[email-masked]> wrote:

>> From: Juri Linkov <[email-masked]>
>> Cc: [email-masked],  [email-masked]
>> Date: Mon, 08 May 2023 18:56:05 +0300
>>
>> >> I think your guess about fonts involved is right
>> >> because the problem disappears when the tab-line face
>> >> doesn't inherit from the 'variable-pitch' face.
>> >
>> > How can a face affect mouse-highlight?
>>
>> Here is the minimal test case:
>>
>>   (insert " " (propertize "TODO"
>>                           'face '(:inherit variable-pitch)
>>                           'mouse-face 'highlight))
>>
>> that causes such effect after moving point over highlighted text
>> in fundamental-mode:
>
> Not reproducible here.  I guess it isn't enough to use a face, you
> need a specific font for that?

I see the problem here (GNU/Linux, Gtk3), and indeed, it depends on the
font: here the default Variable Pitch face, where the Font Family
attribute has the value Sans Serif, is realized with DejaVu Sans, and
strings that begin not just with "T", but also with "Y", "J" or "j", do
not show mouse-face highlighting; but when I set the Font Family
attribute of Variable Pitch face to Luxi Sans, I see the problem only
with strings beginning with "j".  I haven't tested other fonts yet.

> And what exactly is the manifestation of the problem in the image you
> posted? that wide black part that hides the letters "ODO"? or
> something else?

The image that Juri posted (which appears to be from a no-toolkit build)
differs from what I see (under Gtk3), which is simply that the
problematic strings show no mouse-face highlighting when the mouse
pointer moves over them.

Steve Berman