If I want to know how wide a window is, in terms of characters of a given face, I can use #'window-max-chars-per-line ( https://www.gnu.org/software/emacs/manual/html_node/elisp/Window-Sizes.html#index-window_002dmax_002dchars_002dper_002dline ). But if I want to know how tall a window is in terms of characters of a given face, I don't think there's a built-in method to do so. At least, I can't seem to find it. So I wrote one. This would be nice to get into Emacs if I haven't missed any existing functionality. My code : (defun zck--window-max-lines-per-window (face &optional window) "Calculate how many lines of text with face FACE can fit in WINDOW." (truncate (window-body-height window t) (window-font-height window face)))