Subject: Re: bug#79083: 31.0.50; Inconsistencies wrt fixed-pitch face

From: Sean Whitton <[email-masked]>
Date: Fri, 25 Jul 2025 09:03:00 +0100

Hello,

On Thu 24 Jul 2025 at 11:08am +03, Eli Zaretskii wrote:

> Well, now you know.  I realize that not every aspect of the Emacs
> design has its intent necessarily evident to everyone, but that
> doesn't yet mean we should make changes based on the fact that it
> takes time to understand the underlying ideas and their rationale.

Certainly.

>>   - on GNU/Linux chances are none of them are installed (I didn't even
>>     have Courier on my machine until just now) and so you'll get
>>     'fixed', which presumably is resolved concretely to the very same
>>     font family that "monospace-10" is resolved to.  Hence not visually
>>     distinct.
>
> No, on GNU/Linux we request "Monospace" from Fontconfig, and use what
> it gives us.
>
>> So I think the fix for the bug is to add some font families to
>> (assoc "Monospace" face-font-family-alternatives) which are both:
>> 1. very commonly present on GNU/Linux installations; and yet
>> 2. not what "monospace-10" will typically resolve to on those
>>    installations.
>
> This will probably not fix the issue, because (as the comment there
> says) face-font-family-alternatives is only used on systems without
> Fontconfig, which basically means we ignore it on GNU/Linux.  We'd
> need to make changes in Fontconfig files, something that I think is
> not acceptable.

Ah, I see, so another way to look at the issue is that we can't have two
different Monospace fonts without giving up on having Fontconfig handle
font selection for us.  And being able to rely on Fontconfig has all
sorts of benefits which are much more important than this.

>> I don't know what font families would fit the bill, and I agree that it
>> should be considered carefully and thoroughly.
>
> What you see in the current code _is_ the product of carefully
> considering these issues, and also of many years of experience using
> the results.  Personally, I wouldn't touch that with a 10-mile pole.
>
> Again, would you please state some real-life problems we are trying to
> fix here?

Many parts of Emacs are very carefully considered, and other parts
aren't, but look like they are until you investigate a bit.  I was
following my instincts to understand this part better and to write it
down.  Thank you for helping me understand the situation.
I'll now close the bug.

-- 
Sean Whitton