Function: window-default-font-height

window-default-font-height is a byte-compiled function defined in window.el.gz.

Signature

(window-default-font-height &optional WINDOW)

Documentation

Return height in pixels of WINDOW's default face font.

WINDOW must be a live window and defaults to the selected one.

The return value accounts for any remapping of the default face font on WINDOW's frame.

Source Code

;; Defined in /usr/src/emacs/lisp/window.el.gz
(defun window-default-font-height (&optional window)
  "Return height in pixels of WINDOW's default face font.
WINDOW must be a live window and defaults to the selected one.

The return value accounts for any remapping of the default face
font on WINDOW's frame."
  (let* ((window (window-normalize-window window t))
	 (frame (window-frame window))
	 (default-font (face-font 'default frame)))
    ;; Client frames can have the 'display' parameter set like for X
    ;; frames, even though they are TTY frames, so make sure we won't
    ;; be duped by that up front with 'framep'.
    (if (and (not (eq (framep frame) t))
             (display-multi-font-p (frame-parameter frame 'display))
	     (not (string-equal (frame-parameter frame 'font) default-font)))
        (aref (font-info default-font frame) 3)
      (frame-char-height frame))))