Function: font-setting-change-default-font
font-setting-change-default-font is a byte-compiled function defined
in dynamic-setting.el.gz.
Signature
(font-setting-change-default-font DISPLAY-OR-FRAME SET-FONT)
Documentation
Change font and/or font settings for frames on display DISPLAY-OR-FRAME.
If DISPLAY-OR-FRAME is a frame, the display is the one for that frame.
If SET-FONT is non-nil, change the font for frames. Otherwise re-apply the current form for the frame (i.e. hinting or somesuch changed).
Source Code
;; Defined in /usr/src/emacs/lisp/dynamic-setting.el.gz
(defun font-setting-change-default-font (display-or-frame set-font)
"Change font and/or font settings for frames on display DISPLAY-OR-FRAME.
If DISPLAY-OR-FRAME is a frame, the display is the one for that frame.
If SET-FONT is non-nil, change the font for frames. Otherwise re-apply
the current form for the frame (i.e. hinting or somesuch changed)."
(let ((new-font (and (fboundp 'font-get-system-font)
(font-get-system-font)))
(frame-list (frames-on-display-list display-or-frame)))
(when (and new-font (display-graphic-p display-or-frame))
(clear-font-cache)
(if set-font
;; 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 reconsider the existing fonts on all frames on each
;; display, by clearing the font and face caches. This will
;; cause all fonts to be recreated.
(dolist (frame frame-list)
(reconsider-frame-fonts frame))))))