Subject: bug#57962: 29.0.50; Odd font choices

From: Eli Zaretskii <[email-masked]>
Date: Mon, 17 Oct 2022 17:26:43 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Mon, 17 Oct 2022 13:35:46 +0200
> 
> > Is that because ":spacing 'm" doesn't work (it seems to work for me)?
> > If so, I think we should try fixing that instead of introducing new
> > wizardry.
> 
> This:
> 
> (defface fixed-pitch
>   `((t :font ,(font-spec :spacing 'M)))
>   "The basic fixed-pitch face."
>   :group 'basic-faces)
> 
> Made Emacs choose this font:
> 
>     ftcrhb:-GOOG-Noto Sans CJK KR-regular-normal-normal-*-45-*-*-*-*-0-iso10646-1 (#x24)
> 
> Which is not a monospace font (and is a different font family than the
> `default' face uses:
> 
>     ftcrhb:-DAMA-Ubuntu Mono-regular-normal-normal-*-45-*-*-*-m-0-iso10646-1 (#x47)
> 
> So that seems to be another bug in this area?

Maybe this is because font_delete_unmatched doesn't pay attention to
:spacing?  Can you try adding that there, to see whether it could fix
this?

font_sort_entities and font_match_p also could be related, but I don't
know if they are called in this scenario.