GNU bug report logs -
#59347
29.0.50; `:family` face setting ignored
Previous Next
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
Message #296 received at 59347 <at> debbugs.gnu.org (full text, mbox):
>> Do you mean that if a user chooses a font for the default face that has
>> a single variant (say 'regular'), then the 'bold' face (which does not
>> specify any family) should be realized with another font which has a
>> bold variant? And that the 'italic' face should likewise be realized
>> with another font which has an italic variant?
>
> I don't think these situations are possible, at least not all of them,
> because Emacs will not use a font for the default face if that font
> doesn't have at least the bold or italic variant.
>
Hmmm... here at least it does. With Fixedsys500c.ttf in
http://www.ler.is.edu.ro/~ema/proiecte/soft/2005/apm/+predesign/fonts/fixedsys500c.zip
(which has no variants) and (set-face-attribute 'default nil :font
"FixedSysTTF"), the bold, italic and bold-italic faces are identical.
>> FWIW, I don't think either of these options are reasonable.
>
> You keep saying that, but you don't explain why this must be the truth.
> A user or a Lisp program can reasonably want an ultra-bold font and
> consider that more important than keeping the family. You never
> explained why you thought this to be an unreasonable request.
>
It's only my opinion, indeed. I don't think it's a completely
unreasonable request, but it's not what Emacs has been doing so far, and I
do think that it's not what Emacs should do by default. It is better to
preserve a visual coherence / uniformity. Also note that allowing that
would mean that Emacs would need to consider all fonts when realizing a
face, instead of what it does now, namely to relax the family/...
attributes only when necessary, that is, to consider more fonts only when
necessary.
And also note that, should a user really want a specific ultra-bold font
for a certain face, that is already possible with the existing
infrastructure, by making that choice explicit, e.g. (set-face-attribute
'bold nil :font "Desired Font" :weight 'ultra-bold). And it is also
possible, with the existing infrastructure, to list the available fonts
with given attribute values, e.g. with (list-fonts (font-spec :weight
'ultra-bold)), and to select the best one in that list with an appropriate
fourth argument to list-fonts.
This bug report was last modified 2 years and 160 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.