Inhibit font loading in non-gui sessions

This commit is contained in:
Henrik Lissner 2017-06-28 18:13:25 +02:00
parent 29f88e6c63
commit 069d085eec
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -179,15 +179,16 @@ local value, whether or not it's permanent-local. Therefore, we cycle
"Set the theme and load the font, in that order."
(when doom-theme
(load-theme doom-theme t))
(with-demoted-errors "FONT ERROR: %s"
(when (fontp doom-font)
(set-frame-font doom-font nil (if frame (list frame) t)))
;; Fallback to `doom-unicode-font' for Unicode characters
(when (fontp doom-unicode-font)
(set-fontset-font t 'unicode doom-unicode-font frame))
;; ...and for variable-pitch-mode:
(when (fontp doom-variable-pitch-font)
(set-face-attribute 'variable-pitch frame :font doom-variable-pitch-font)))
(when (display-graphic-p)
(with-demoted-errors "FONT ERROR: %s"
(when (fontp doom-font)
(set-frame-font doom-font nil (if frame (list frame) t)))
;; Fallback to `doom-unicode-font' for Unicode characters
(when (fontp doom-unicode-font)
(set-fontset-font t 'unicode doom-unicode-font frame))
;; ...and for variable-pitch-mode:
(when (fontp doom-variable-pitch-font)
(set-face-attribute 'variable-pitch frame :font doom-variable-pitch-font))))
(run-hooks 'doom-init-ui-hook))
(defun doom|reload-ui-in-daemon (frame)