From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: What is a default font?
Date: Sat, 07 Dec 2019 12:29:51 +0200 [thread overview]
Message-ID: <8336dwfmxs.fsf@gnu.org> (raw)
In-Reply-To: <5a990e63-8794-ae25-3063-ea9271b12677@gmx.at> (message from martin rudalics on Sat, 7 Dec 2019 10:39:51 +0100)
> Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
> From: martin rudalics <rudalics@gmx.at>
> Date: Sat, 7 Dec 2019 10:39:51 +0100
>
> Thanks. But you left the doc-string of 'face-font' alone. That
> doc-string still says that
>
> If FRAME is t, report on the defaults for face FACE (for new frames).
>
> which is wrong according to Stefan
>
> Yes, you can, but only if you know in which frame it will be displayed
> (or you can approximate it by using a frame "similar" to the one that
> will be used).
>
> and you
>
> For a frame that was not yet created there are too many unknowns
> for face-font to be able to help you efficiently. The best you can do
> is assume the new frame will have the same faces as the selected one.
This is a misunderstanding. What I meant to say was that when a new
frame is created, we usually apply frame-parameters from all kinds of
sources, and that is what I referred to as "unknowns". barring that,
the above line is accurate, albeit you may see it as useless in your
use case.
> What I'm still unsure about is the following paragraph in the Elisp
> manual:
>
> If ‘face-remapping-alist’ is buffer-local, its local value takes
> effect only within that buffer. If ‘face-remapping-alist’ includes
> faces applicable only to certain windows, by using the
> ‘(:filtered (:window PARAM VAL) SPEC)’, that face takes effect only
> in windows that match the filter conditions (*note Special
> Properties::). To turn off face filtering temporarily, bind
> ‘face-filters-always-match’ to a non-‘nil’ value, then all face
> filters will match any window.
>
> From this I'd conclude that I might have to explicitly select a
> specific window (and not just its frame) before calling any of the
> functions 'default-font-height', 'face-font', ... in order to process
> 'face-remapping-alist' correctly. Is that conclusion correct? If so,
> the descriptions of these functions should tell that.
It depends on what you are going to use the results of
default-font-height etc. for. And I'd consider it a bug, or at least
a misfeature, to have the default face filtered like that anyway.
next prev parent reply other threads:[~2019-12-07 10:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-03 18:36 What is a default font? martin rudalics
2019-12-04 16:12 ` Eli Zaretskii
2019-12-04 18:04 ` martin rudalics
2019-12-04 19:38 ` Štěpán Němec
2019-12-05 7:50 ` martin rudalics
2019-12-05 15:03 ` Eli Zaretskii
2019-12-04 21:21 ` Stefan Monnier
2019-12-05 17:54 ` martin rudalics
2019-12-05 18:04 ` Eli Zaretskii
2019-12-05 18:24 ` martin rudalics
2019-12-05 18:51 ` Eli Zaretskii
2019-12-05 18:59 ` martin rudalics
2019-12-05 19:13 ` Eli Zaretskii
2019-12-06 8:35 ` martin rudalics
2019-12-06 15:14 ` Eli Zaretskii
2019-12-07 9:39 ` martin rudalics
2019-12-07 10:24 ` Eli Zaretskii
2019-12-06 15:45 ` Eli Zaretskii
2019-12-07 9:39 ` martin rudalics
2019-12-07 10:29 ` Eli Zaretskii [this message]
2019-12-08 9:03 ` martin rudalics
2019-12-08 15:39 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8336dwfmxs.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rudalics@gmx.at \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.