Only init fonts once, and for any (tty/gui) session
This commit is contained in:
parent
87f18bb906
commit
9f2a94c25a
1 changed files with 19 additions and 21 deletions
|
@ -440,10 +440,8 @@ character that looks like a space that `whitespace-mode' won't affect.")
|
|||
|
||||
(defun doom|init-fonts (&optional frame)
|
||||
"Initialize fonts."
|
||||
(add-hook 'after-make-frame-functions #'doom|init-fonts)
|
||||
(when (fontp doom-font)
|
||||
(map-put default-frame-alist 'font (font-xlfd-name doom-font)))
|
||||
(when (display-graphic-p)
|
||||
(or frame (setq frame (selected-frame)))
|
||||
(condition-case-unless-debug ex
|
||||
(progn
|
||||
|
@ -462,7 +460,7 @@ character that looks like a space that `whitespace-mode' won't affect.")
|
|||
(font-get (caddr ex) :family))
|
||||
(lwarn 'doom-ui :error
|
||||
"Unexpected error while initializing fonts: %s"
|
||||
(error-message-string ex)))))))
|
||||
(error-message-string ex))))))
|
||||
|
||||
(defun doom|init-theme ()
|
||||
"Set the theme and load the font, in that order."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue