help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

window-height but taking the face into account


From: mbork
Subject: window-height but taking the face into account
Date: Mon, 25 Mar 2024 17:13:38 +0100
User-agent: mu4e 1.12.0; emacs 30.0.50

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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]