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." "Set the theme and load the font, in that order."
(when doom-theme (when doom-theme
(load-theme doom-theme t)) (load-theme doom-theme t))
(with-demoted-errors "FONT ERROR: %s" (when (display-graphic-p)
(when (fontp doom-font) (with-demoted-errors "FONT ERROR: %s"
(set-frame-font doom-font nil (if frame (list frame) t))) (when (fontp doom-font)
;; Fallback to `doom-unicode-font' for Unicode characters (set-frame-font doom-font nil (if frame (list frame) t)))
(when (fontp doom-unicode-font) ;; Fallback to `doom-unicode-font' for Unicode characters
(set-fontset-font t 'unicode doom-unicode-font frame)) (when (fontp doom-unicode-font)
;; ...and for variable-pitch-mode: (set-fontset-font t 'unicode doom-unicode-font frame))
(when (fontp doom-variable-pitch-font) ;; ...and for variable-pitch-mode:
(set-face-attribute 'variable-pitch frame :font doom-variable-pitch-font))) (when (fontp doom-variable-pitch-font)
(set-face-attribute 'variable-pitch frame :font doom-variable-pitch-font))))
(run-hooks 'doom-init-ui-hook)) (run-hooks 'doom-init-ui-hook))
(defun doom|reload-ui-in-daemon (frame) (defun doom|reload-ui-in-daemon (frame)