GNU bug report logs -
#52905
29.0.50; "fixed-pitch" face doesn't respect the font in "default-frame-alist"
Previous Next
Reported by: Dima Kogan <dima <at> secretsauce.net>
Date: Thu, 30 Dec 2021 20:18:02 UTC
Severity: normal
Found in version 29.0.50
Done: Dima Kogan <dima <at> secretsauce.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#52905: 29.0.50; "fixed-pitch" face doesn't respect the font in "default-frame-alist"
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 52905 <at> debbugs.gnu.org.
--
52905: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=52905
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
> Yes, I think it is fine to see 2 different fonts in this case. Once
> again, the reason is that the fixed-pitch face specifies its own font.
Alright. I'll fix this on my end. I'm closing the issue. Thanks for
discussing it.
[Message part 3 (message/rfc822, inline)]
Hi. I'm running a very recent emacs snapshot from 2021/12/19:
0bc2900bbcb. I'm on Debian GNU/Linux, using the GTK-based build on X.
In the last few months I've been observing some font handling updates in
emacs that cause an inconsistency with the way things are displayed. As
suggested by the emacs documentation, I set the font I want by touching
default-frame-alist. The docs are here:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Fonts.html
I've had this setting in my .emacs for many years. Today this isn't
respected everywhere. A recipe:
emacs -Q --eval \
"(progn
(setf (alist-get 'font default-frame-alist)
\"-adobe-courier-medium-r-*-*-14-*-*-*-*-*-iso8859-*\")
(org-mode)
(insert \"abc\\n#+begin_\"))"
Here I start up emacs without .emacs, but with some default-frame-alist
setting. I enter org-mode and insert some text.
Invoking C-u C-x = on any of "abc" tells me that no particular face is
active there, and that my default font is being used.
Invoking C-u C-x = on any of "#+begin_" tells me that the org-meta-line
face is active there. This face ultimately derives from the fixed-pitch
face, which uses a different monospace font: ftcrhb:-Bits-Bitstream Vera
Sans Mono-regular-normal-normal-*-14-*-*-*-m-0-iso10646-1.
But I already selected a monospaced font in default-frame-alist, so I
expect to get the same font here, which was the case for many years. The
fixed-pitch face is defined like this in faces.el:
(defface fixed-pitch
'((t :family "Monospace"))
"The basic fixed-pitch face."
:group 'basic-faces)
I can "fix" this by resetting the fixed-pitch face to use the default:
(defface fixed-pitch
'((t))
"The basic fixed-pitch face."
:group 'basic-faces)
So is this a "bug"? Is this a documentation problem? Setting the default
font to a monospace font, as described by the emacs docs should end up
being picked up by the fixed-pitch face.
Thanks!
This bug report was last modified 3 years and 137 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.