mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-05 12:37:33 -05:00
Only init fonts once, and for any (tty/gui) session
This commit is contained in:
@ -440,10 +440,8 @@ character that looks like a space that `whitespace-mode' won't affect.")
|
|||||||
|
|
||||||
(defun doom|init-fonts (&optional frame)
|
(defun doom|init-fonts (&optional frame)
|
||||||
"Initialize fonts."
|
"Initialize fonts."
|
||||||
(add-hook 'after-make-frame-functions #'doom|init-fonts)
|
|
||||||
(when (fontp doom-font)
|
(when (fontp doom-font)
|
||||||
(map-put default-frame-alist 'font (font-xlfd-name doom-font)))
|
(map-put default-frame-alist 'font (font-xlfd-name doom-font)))
|
||||||
(when (display-graphic-p)
|
|
||||||
(or frame (setq frame (selected-frame)))
|
(or frame (setq frame (selected-frame)))
|
||||||
(condition-case-unless-debug ex
|
(condition-case-unless-debug ex
|
||||||
(progn
|
(progn
|
||||||
@ -462,7 +460,7 @@ character that looks like a space that `whitespace-mode' won't affect.")
|
|||||||
(font-get (caddr ex) :family))
|
(font-get (caddr ex) :family))
|
||||||
(lwarn 'doom-ui :error
|
(lwarn 'doom-ui :error
|
||||||
"Unexpected error while initializing fonts: %s"
|
"Unexpected error while initializing fonts: %s"
|
||||||
(error-message-string ex)))))))
|
(error-message-string ex))))))
|
||||||
|
|
||||||
(defun doom|init-theme ()
|
(defun doom|init-theme ()
|
||||||
"Set the theme and load the font, in that order."
|
"Set the theme and load the font, in that order."
|
||||||
|
Reference in New Issue
Block a user