From: martin rudalics <rudalics@gmx.at>
To: emacs-devel <emacs-devel@gnu.org>
Subject: What is a default font?
Date: Tue, 3 Dec 2019 19:36:41 +0100 [thread overview]
Message-ID: <4c86b07f-175d-f6cf-171a-b58474ab717a@gmx.at> (raw)
I just noticed that my implementation of 'window-default-font-height'
is likely wrong. The fault is all mine but I think that, in a sense,
'default-font-height', 'default-font-width', 'default-line-height' and
'face-font' are to blame as well.
In particular, the 'face-font' doc-string should tell that it returns
a value for the current buffer if FRAME is nil or omitted and a value
for FRAME if it is non-nil, disregarding the current buffer in that
case entirely. If that's the correct interpretation of that function.
So far I can't make heads or tails of it.
The other functions are IMO ill-specified for the case where the
current buffer does not appear on the selected frame. Using values
returned by 'frame-parameter', 'frame-char-height' and
'frame-char-width' in that case can be misleading and present simple
guesses at the best.
Personally, I would prefer two types of functions. One for getting
the default face font of a buffer alone (including remapping) and one
for the default face font of a frame. But I don't know enough about
fonts, their remapping and their relationship to frames to tell what
really makes sense here.
martin
next reply other threads:[~2019-12-03 18:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-03 18:36 martin rudalics [this message]
2019-12-04 16:12 ` What is a default font? 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
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=4c86b07f-175d-f6cf-171a-b58474ab717a@gmx.at \
--to=rudalics@gmx.at \
--cc=emacs-devel@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 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.