Subject: Re: bug#57555: 29.0.50; variable-pitch font issue with medium weight default font

From: Eli Zaretskii <[email-masked]>
Date: Tue, 06 Sep 2022 18:42:15 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: Gregory Heytings <[email-masked]>,  [email-masked],
>   [email-masked]
> Date: Tue, 06 Sep 2022 16:28:21 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Well, you reverted the important part of commit 6b1ed2f, which Amin
> > said caused his problem.  So you are not on a wrong path wrt that...
> 
> As far as I can tell, your patch just reverted the code back to the
> state before this:
> 
> commit bf0d3f76dcfe7881cb3058169b51cf6602fdcdcb
> Author:     Kenichi Handa <[email-masked]>
> AuthorDate: Sun Jul 20 00:18:23 2014 +0900
> 
>     2014-07-19  Kenichi Handa  <[email-masked]>
>     
>             * xfaces.c (realize_x_face): Call font_load_for_lface with no
>             mandatory font spec (Bug#17973).
>     
>     2014-07-19  Stefan Monnier  <[email-masked]>
>     
>             * font.c (font_score): Return the worst score if the size of
>             ENTITY is wrong by more than a factor 2 (Bug#17973).

Yes.  As I explained back then.

> So we've come full circle.

No, we haven't.  Emacs works as expected: it requests a medium-weight
font for the variable-pitch face, because the fixed-pitch face was
customized to use a medium weight.  Since the font Amin wants to use
for variable-pitch doesn't have a medium variant, Emacs selects
another one.  There's no real problem I see here, except an issue with
user expectations not being satisfied.

"Fixing" this by disregarding all the attributes of the face's font is
throwing the baby with bathwater.