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: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 59347 <at> debbugs.gnu.org
Subject: bug#59347: 29.0.50; `:family` face setting ignored
Date: Sat, 19 Nov 2022 09:55:29 -0500
> Then Emacs does here what we intended it to do: it tries to match the
> variable-pitch font to the attributes of the default font.  And DejaVu
> Sans fails that test on your system, because DejaVu Sans doesn't have
> a variant with the font attributes that are present in misc-fixed font
> you use as the default face's font.

Then maybe the problem is the following: I do not consider
`-misc-fixed-*-r-semicondensed-*-13-*-*-*-*-*-*-*` to include "please
use non-anti-aliased fonts", contrary to the `-fn monospace:antialias=0`
of bug#37473?

I'd actually be happier if Emacs could find an anti-aliased version
of misc-fixed :-)

The only part I could see that "collides" with "DejaVu Sans" is the
"semicondensed" part, but if I change my recipe to add `:width normal`,
I *still* don't get to see my variable-pitch text in DejaVu Sans.

Oh wait... I can recover the behavior I want by selecting

    :family "DejaVu Sans" :foundry "PfEd"

so the problem is the foundry info.  Changing the recipe to use

    -*-fixed-*-r-semicondensed-*-13-*-*-*-*-*-*-*

doesn't help, OTOH (IOW Emacs insists on preserving the foundry even if
I did not explicitly request any particular foundry).

Does it make sense to preserve the `:foundry` attribute when the
`:family` is different?  I always thought of `:foundry` as a weird
detail which only makes sense when selecting a specific implementation
of a given `:family`.  In my experience the foundry is very rarely
used/exposed (e.g., I had no idea what was the foundry to use for
`DejaVu Sans` and I have no idea what "PfEd" means (but my web search
suggests it's not really a "foundry")), and it's rare to have
several foundries for the same font family.

Is there some way to say `:foundry any` in order to override the
default's foundry but without having to choose a particular foundry?


        Stefan


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





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.