Function: default-font-height
default-font-height is a byte-compiled function defined in
simple.el.gz.
Signature
(default-font-height)
Documentation
Return the height in pixels of the current buffer's default face font.
If the default font is remapped (see face-remapping-alist), the
function returns the height of the remapped face.
This function uses the definition of the default face for the currently
selected frame.
Probably introduced at or before Emacs version 25.1.
Source Code
;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun default-font-height ()
"Return the height in pixels of the current buffer's default face font.
If the default font is remapped (see `face-remapping-alist'), the
function returns the height of the remapped face.
This function uses the definition of the default face for the currently
selected frame."
(let ((default-font (face-font 'default)))
(cond
((and (display-multi-font-p)
;; Avoid calling font-info if the frame's default font was
;; not changed since the frame was created. That's because
;; font-info is expensive for some fonts, see bug #14838.
(not (string= (frame-parameter nil 'font) default-font)))
(aref (font-info default-font) 3))
(t (frame-char-height)))))