Function: pixel-visual-line-height
pixel-visual-line-height is a byte-compiled function defined in
pixel-scroll.el.gz.
Signature
(pixel-visual-line-height)
Documentation
Return height in pixels of text line where cursor is in the selected window.
Source Code
;; Defined in /usr/src/emacs/lisp/pixel-scroll.el.gz
(defun pixel-visual-line-height ()
"Return height in pixels of text line where cursor is in the selected window."
(let ((pos (pixel-visible-pos-in-window)))
(cond
;; When a char of line is shown, obtain height by
;; (line-pixel-height).
(pos (save-excursion (goto-char pos) (line-pixel-height)))
;; When no char of line is shown but the line is at the top,
;; obtain height by (line-pixel-height). This is based on
;; expected response from display engine. See following
;; discussion.
;; https://lists.gnu.org/r/emacs-devel/2017-10/msg00621.html
((equal (count-lines (window-start) (point)) 1)
(line-pixel-height))
;; No char of line is shown and the line is not at the top,
;; obtain height by (frame-char-height).
(t (frame-char-height)))))