Subject: Re: bug#57962: 29.0.50; Odd font choices

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 17 Oct 2022 11:57:12 +0200

Eli Zaretskii <[email-masked]> writes:

> Strange.  But I'm not sure I understand the meaning of the 48 think in
> the font's XLFD signature.

After googling "difference in font sizes", it's reminded me what I knew
before, but had apparently suppressed -- those numbers don't really mean
much, and actual font sizes just vary according to the font designers'
whims.

So there is no way to say "I have font X, give me font Y of the same
size".

So I think we just have to mitigate this on a practical level, and the
practical problem we have is that we expect a (fixed pitch) `default' font
to have the same size as the `help-key-binding' font, since we mix these
faces so much in our displays, and we want them to line up in tabular
outputs.

This means that we can either remove ":inherit fixed-pitch" from the
latter face -- and that would fix the problem in 99.7% of the cases.
But ideally, we'd like to have that face be fixed-pitch even if
`default' uses a proportional font (which is possibly, but very very
unusual).  To achieve that we'd have to implement something like

  :inherit (if (monospacep 'default) 'default 'fixed-pitch)

or something?

Or any other ideas?  (I've added Stefan K to the CCs; perhaps he has
ideas here.)