GNU bug report logs -
#59347
29.0.50; `:family` face setting ignored
Previous Next
Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Fri, 18 Nov 2022 04:58:01 UTC
Severity: normal
Found in version 29.0.50
Done: Gregory Heytings <gregory <at> heytings.org>
Bug is archived. No further changes may be made.
Full log
Message #95 received at 59347 <at> debbugs.gnu.org (full text, mbox):
>> -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1
>>
>> in which you see the 'medium' height.
>
> You mean weight, not height, right?
>
Yes, sorry for the typo.
>
> Does this font have a 'regular' weight? If it does, why didn't Emacs
> choose the 'regular' variant?
>
Because the spec specified that it should find a medium variant. So
regular variants are rejected (because of 65fd3ca84f).
>
> In any case, I don't understand how asking for a specific foundry can
> work around the problem with weight. If you do understand that, please
> tell the details.
>
I'd have to investigate this, is it really worth the effort given that a
proper fix has already been found?
>>> If we don't make font_score consistent with the change you made, we
>>> will have other weird problems. Maybe not in this particular case
>>> (although I'm not sure even in this), but in others.
>>
>> Thanks, I think I see what you mean now. I overlooked the fact that
>> font_select_entity is called with attrs and not with work, so indeed
>> font_score called in font_sort_entities might reject (?) a legitimate
>> font. Is that what you mean?
>
> Yes. We need to make sure the scoring will not now sometimes prefer the
> medium weight where the regular weight exists and is a better match.
> Not only should it not reject a legitimate font, but also not prefer
> another font due to this change. IOW, the change should ideally only
> affect the cases where the 'medium' weight doesn't exist, and we
> therefore prefer to use 'regular' rather than reject the family.
>
I don't think the case you have in mind could happen in the scenario of
this bug or bug#57555 (if a regular weight exists and is a better match
the loop in font_find_for_lface will exit with that better match), but
indeed with some other call sequence this could perhaps happen. I'll see
what I can do.
This bug report was last modified 2 years and 159 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.