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

From: Stefan Monnier <[email-masked]>
Date: Fri, 18 Nov 2022 09:59:38 -0500

>>     src/emacs -Q --eval \
>>         '(progn
>>            (custom-set-faces `(variable-pitch
>>                                ((t (:family "DejaVu Sans")))))
>>            (add-to-list `default-frame-alist
>>                         `(font . "-misc-fixed-*-r-semicondensed-*-13-*-*-*-*-*-*-*"))
>>            (font-lock-mode -1)
>>            (insert (propertize "hello" `face `variable-pitch)))'
>> 
>> I get "hello" shown in the same font as with the default face
>> (i.e. "misc-fixed") instead using DejaVu Sans.
>
> All those backquotes, are they really backquotes when you type this?

Yes.

> Or should they be escaped apostrophes?

It's a pain in the rear to escape quotes from within quotes, so I use
backquotes instead, which works as well as long as there's no comma
nested inside :-)

> More to the point, why do you think this is a bug in Emacs?  What
> happened here is that you requested a face to use some font family,
> and Emacs for whatever reasons decided not to use that family.  Why is
> that a bug?  Why are you sure Emacs didn't do that for valid reasons?

I'm not.  I just can't see an obvious good reason for it.
I suspect I wouldn't be the only user who'd find this rather perplexing.

So let me return the question: what part of the above code makes you
think it's correct for Emacs to use a different font than the DejaVu Sans?

> Like, for example, that DejaVu Sans doesn't have a variant with the
> size that matches the default face's font?

DejaVu is a scalable font, so I can't see how it could not have a size
that matches.

        Stefan