unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dima Kogan <dima@secretsauce.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 52905@debbugs.gnu.org
Subject: bug#52905: 29.0.50; "fixed-pitch" face doesn't respect the font in "default-frame-alist"
Date: Thu, 30 Dec 2021 23:34:58 -0800	[thread overview]
Message-ID: <875yr5b47r.fsf@secretsauce.net> (raw)
In-Reply-To: <83v8z5grpn.fsf@gnu.org>

Hi Eli.

Broadly-speaking the complaint is:

  I've been doing what the docs tell me to do for many years, and it has
  been looking nice for many years, and now it doesn't look nice
  anymore

I just looked at version control, and the thing that actually made
things weird in THIS case is the update to org 9.5:

  https://github.com/emacs-mirror/emacs/commit/bf9ec3d91a79414deac039f7bf83352a9b0a9a85

It made the org-meta-line face inherit from "fixed-pitch", which is
fine. More notes follow...


> You seem to assume that the default face's font is also the font
> used by the fixed-pitch face?  There's no basis for this assumption:
> as long as a face defines :font or :family attributes, the font for
> that face is selected independently.  The "Monospace" family
> doesn't stand for "the monospace font selected fro thedefault face",
> it stands for some font that belongs to the "Monospace" family.  What
> exactly does that family include depends on your font back-end and the
> fonts installed on your system, but Vera Sans Mono doesn't sound like
> it shouldn't be in that family, it sounds right to me.

Yes. That is exactly what it's doing today. But it isn't nice. If emacs
has a "default" font, and that font happens to be a fixed-pitch font,
then the "fixed-pitch" face should use that default font. Otherwise, the
"default" font choice is ignored in arbitrary places, creating a poor
user experience. I think the ways to fix this are:

1. Not having a default font at all

2. Some logic that vaguely does (in pseudo-code):

   (set-font-for-face
     fixed-pitch
     (if (font-is-fixed-p default-font)
       default-font
       (get-some-fixed-pitch-font)))

   (set-font-for-face
     variable-pitch
     (if (font-is-variable-p default-font)
       default-font
       (get-some-variable-pitch-font)))

   Is there an easy, reliable way to tell if a given font is fixed or
   not? If so, this would be a good way to honor the user's choice of
   default font.

Thanks!





  reply	other threads:[~2021-12-31  7:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-30 20:17 bug#52905: 29.0.50; "fixed-pitch" face doesn't respect the font in "default-frame-alist" Dima Kogan
2021-12-31  7:26 ` Eli Zaretskii
2021-12-31  7:34   ` Dima Kogan [this message]
2021-12-31  8:15     ` Eli Zaretskii
2021-12-31  8:24       ` Dima Kogan
2021-12-31 13:10         ` Eli Zaretskii
2022-01-01 19:07           ` Dima Kogan
2022-01-01 20:28             ` Eli Zaretskii
2022-01-01 20:32               ` Dima Kogan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875yr5b47r.fsf@secretsauce.net \
    --to=dima@secretsauce.net \
    --cc=52905@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).