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: Gregory Heytings <gregory <at> heytings.org>
Cc: monnier <at> iro.umontreal.ca, 59347 <at> debbugs.gnu.org
Subject: bug#59347: 29.0.50; `:family` face setting ignored
Date: Tue, 22 Nov 2022 16:52:17 +0200
> Date: Tue, 22 Nov 2022 14:39:16 +0000
> From: Gregory Heytings <gregory <at> heytings.org>
> cc: monnier <at> iro.umontreal.ca, 59347 <at> debbugs.gnu.org
> 
> > Why do you expect to get a variable pitch font?
> >
> 
> The variable-pitch face should use a variable pitch font, shouldn't it? 
> Unless there are no such fonts installed on the computer of course, in 
> which case it could fall back to a monospace font.

You know it and I know it, but how should the code which examines the fonts
know it?  AFAICT, nothing tells it to reject fixed-pitch fonts.  Or did I
miss something?

> > Emacs tries to find a font from the same family, but if that fails for 
> > some reason, all bets are off wrt whether the font we find will be 
> > variable-pitch or not.  Or what am I missing?
> 
> Why should the weight of the default face influence the font selected for 
> the variable-pitch face

Because if the default face is bold, so should be other faces, preferably.
To keep a consistent appearance, so to say.  And the same goes for slant and
width.

> to the point that even when variable pitch fonts 
> are installed on the computer, they are all flatly rejected because they 
> do not explicitly support say the 'semi-bold' weight?  The weight of the 
> default face should only influence the weight of the other faces

How are "other faces", where you agree that the weight should matter,
different from the variable-pitch face, where you don't agree?

Anyway, I'm okay with doing what you suggest as a fallback, if the code we
have now somehow didn't produce satisfactory results.  Provided we can
define reasonable criteria for what is "satisfactory".  But I don't think
it's right to throw away these 2 attributes to begin with, no.

> With a 'semi-bold' default face, a 'bold' variable pitch font is a
> legitimate candidate for the variable-pitch face.

But your patch doesn't "loosen" just one attribute, it does that with all 3
in one blow.  Maybe if we "loosen" just one, we will be able to find a match
for the other two.  I don't think font_score guarantees that, does 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.