Commit 1a67b811 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Fix bug #14838 with slow scrolling with certain fonts.

 lisp/simple.el (default-font-height): Don't call font-info if the
 frame's default font didn't change since the frame was created.
parent 58fbe886
2013-07-13 Eli Zaretskii <eliz@gnu.org>
* simple.el (default-font-height): Don't call font-info if the
frame's default font didn't change since the frame was created.
(Bug#14838)
2013-07-13 Leo Liu <sdl.web@gmail.com>
* ido.el (ido-read-file-name): Guard against non-symbol value.
......
......@@ -4739,10 +4739,15 @@ lines."
(defun default-font-height ()
"Return the height in pixels of the current buffer's default face font."
(cond
((display-multi-font-p)
(aref (font-info (face-font 'default)) 3))
(t (frame-char-height))))
(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)))))
(defun default-line-height ()
"Return the pixel height of current buffer's default-face text line.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment