Subject: Re: bug#59347: 29.0.50; `:family` face setting ignored

From: Eli Zaretskii <[email-masked]>
Date: Mon, 21 Nov 2022 14:51:10 +0200

> Date: Sun, 20 Nov 2022 21:49:46 +0000
> From: Gregory Heytings <[email-masked]>
> cc: [email-masked], [email-masked]
> 
> Also, AFAIU, a font whose weight == spec_prop[weight] is in principle 
> preferred to a font whose weight != spec_prop[weight].  However, a font 
> whose weight != spec_prop[weight] could in practice be preferred to a font 
> whose weight == spec_prop[weight] when it is a better match according to 
> the other sorting criteria (size and width, and possibly type and slant). 
> How could (and why should) this be changed to make sure that the scoring 
> will not sometimes prefer the medium weight when the regular weight 
> exists?

I thought the answer to your question would be "adjust the scoring such that
what we don't want to happen, doesn't".

One way of doing that is by boosting the score when there's an exact match
in attributes which we consider "more equal than others".  I guess weight is
one of them, and perhaps the only one.

Btw, another conceptual issue I have with your patch is that it treats
'medium' and 'regular' asymmetrically (AFAIU): if we see 'medium', we also
consider 'normal', but not vice versa.  Why the asymmetry? why not always
consider the other when we see the one?