diff options
Diffstat (limited to 'lisp/dynamic-setting.el')
| -rw-r--r-- | lisp/dynamic-setting.el | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/lisp/dynamic-setting.el b/lisp/dynamic-setting.el index 8ac9a1e9e6a..ff7bf182d1b 100644 --- a/lisp/dynamic-setting.el +++ b/lisp/dynamic-setting.el @@ -51,19 +51,12 @@ the current form for the frame (i.e. hinting or somesuch changed)." ;; Set the font on all current and future frames, as though ;; the `default' face had been "set for this session": (set-frame-font new-font nil frame-list) - ;; Just redraw the existing fonts on all frames: - (dolist (f frame-list) - (let ((frame-font - (or (font-get (face-attribute 'default :font f 'default) - :user-spec) - (frame-parameter f 'font-parameter)))) - (when frame-font - (set-frame-parameter f 'font-parameter frame-font) - (set-face-attribute 'default f - :width 'normal - :weight 'normal - :slant 'normal - :font frame-font)))))))) + ;; Just redraw the existing fonts on all frames, by clearing + ;; the font and face caches. This will cause all fonts to be + ;; recreated. + (clear-font-cache) + (clear-face-cache t) + (redraw-display))))) (defun dynamic-setting-handle-config-changed-event (event) "Handle config-changed-event on the display in EVENT. |
