window-line-height

window-line-height is a built-in function in `C source code'.

(window-line-height &optional LINE WINDOW)

Return height in pixels of text line LINE in window WINDOW.
WINDOW must be a live window and defaults to the selected one.

Return height of current line if LINE is omitted or nil. Return height of
header or mode line if LINE is `header-line' or `mode-line'.
Otherwise, LINE is a text line number starting from 0. A negative number
counts from the end of the window.

Value is a list (HEIGHT VPOS YPOS OFFBOT), where HEIGHT is the height
in pixels of the visible part of the line, VPOS and YPOS are the
vertical position in lines and pixels of the line, relative to the top
of the first text line, and OFFBOT is the number of off-window pixels at
the bottom of the text line. If there are off-window pixels at the top
of the (first) text line, YPOS is negative.

Return nil if window display is not up-to-date. In that case, use
`pos-visible-in-window-p' to obtain the information.