GNU bug report logs - #59347
29.0.50; `:family` face setting ignored

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 59347 <at> debbugs.gnu.org
Subject: bug#59347: 29.0.50; `:family` face setting ignored
Date: Sat, 19 Nov 2022 18:16:13 +0200
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: 59347 <at> debbugs.gnu.org
> Date: Sat, 19 Nov 2022 11:01:03 -0500
> 
> >> PS: Things become really weird with:
> >> 
> >>     src/emacs -Q --eval '(progn (custom-set-faces `(variable-pitch ((t
> >> (:family "DejaVu Sans" :foundry "*"))))) (add-to-list `default-frame-alist
> >> `(font . "-*-fixed-*-*-semicondensed-*-13-*-*-*-*-*-*-*"))
> >> (font-lock-mode -1) (insert (propertize "hello" `face `variable-pitch) "
> >> world"))'
> >> 
> >> where "hello" ends up with the following font:
> >> 
> >>     ftcrhb:-urw-Century Schoolbook L-medium-normal-normal-*-13-*-*-*-*-0-iso10646-1
> >
> > Why is this weird?
> 
> To me this font comes literally out of nowhere.

AFAIR, when we fail to find fonts that match the spec, we
progressively set more and more attributes to nil, so that in the end
we have all of them nil, and then the first font that matches the size
is fine.

> AFAICT the only relevant face specifications at play here are the two
> pieces of font-info in the recipe (and `face-font-family-alternatives`
> but this doesn't seem to play any role).

The other attributes come from the default face's font, I think.

> So, how do we end up with the `Century Schoolbook L` family (rather
> than either `fixed` or `DejaVu Sans` both of such seem just as
> qualified)?

I think if you step through the code, you will see it.




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.