Function: window-default-line-height
window-default-line-height is a byte-compiled function defined in
window.el.gz.
Signature
(window-default-line-height &optional WINDOW)
Documentation
Return height in pixels of a text line in WINDOW.
WINDOW must be a live window and defaults to the selected one.
The return value includes any line spacing defined for WINDOW's buffer or frame and accounts for any remapping of the default face on WINDOW's frame.
Source Code
;; Defined in /usr/src/emacs/lisp/window.el.gz
(defun window-default-line-height (&optional window)
"Return height in pixels of a text line in WINDOW.
WINDOW must be a live window and defaults to the selected one.
The return value includes any line spacing defined for WINDOW's
buffer or frame and accounts for any remapping of the default
face on WINDOW's frame."
(let* ((window (window-normalize-window window t))
(font-height (window-default-font-height window))
(frame (window-frame window))
(buffer (window-buffer window))
(space-height
(or (and (display-graphic-p frame)
(or (buffer-local-value 'line-spacing buffer)
(frame-parameter frame 'line-spacing)))
0)))
(+ font-height
(if (floatp space-height)
(truncate (* (frame-char-height frame) space-height))
space-height))))