From: mbork@mbork.pl
To: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: window-height but taking the face into account
Date: Mon, 25 Mar 2024 17:13:38 +0100 [thread overview]
Message-ID: <87ttku2sst.fsf@mbork.pl> (raw)
Hi all,
it seems that `window-height' returns the same number irrespective of
the font size I use (set up with `text-scale-adjust'). Is it possible
to get the actual number of lines visible on the screen? And yes, I am
aware that when different parts have different font sizes, it can get
messy etc., but I don't care about such issues -- I just want to know
how many lines are actually visible in the current window.
I think I could use something like
(floor (window-pixel-height) (window-default-line-height)).
Is there a better way?
TIA,
--
Marcin Borkowski
https://mbork.pl
https://crimsonelevendelightpetrichor.net/
next reply other threads:[~2024-03-25 16:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 16:13 mbork [this message]
2024-03-25 16:57 ` window-height but taking the face into account Eli Zaretskii
2024-03-26 13:48 ` Stefan Monnier via Users list for the GNU Emacs text editor
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=87ttku2sst.fsf@mbork.pl \
--to=mbork@mbork.pl \
--cc=help-gnu-emacs@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.