Subject: Re: bug#40097: 28.0.50; Preferred font ignored for specific charset

From: Sergey Organov <[email-masked]>
Date: Wed, 18 Mar 2020 07:43:39 +0300

Eli Zaretskii <[email-masked]> writes:

>> From: Sergey Organov <[email-masked]>
>> Cc: [email-masked]
>> Date: Tue, 17 Mar 2020 19:12:33 +0300
>> 
>> > Can you show all the fonts on your system that have microsoft-cp1251
>> > as their registry/encoding?  AFAIK, this is done with xlsfonts.
>> 
>> Sure:
>
> So there's a single font, Terminus, which supports that charset.  I
> think you can work around this problem locally by adding that font to
> face-ignored-fonts.

Yeah:

(setq face-ignored-fonts '(".*-cp1251$"))

does the trick for me indeed, thanks!

> We could perhaps introduce a customizable variable that would allow
> users who want that to disable the preference of charset-supporting
> fonts when the text has the 'charset' property.  CC'ing Handa-san who
> could comment on how important is this feature nowadays.

When I wrote original question, I was sure I've read somewhere in the
docs that Emacs does prefer fonts with particular encoding, and then I
missed it and can't find it anymore. I wonder if it is even documented,
or did I read it somewhere else, maybe in some relevant discussion?

I mean if it's even undocumented and is not important nowadays, maybe
it's indeed better to drop it rather than bother with customizations.
And if it is to be customizable, it should probably be a fontset feature
rather than global?

Thanks,
-- Sergey