Better error-handling for missing fonts #301
This commit is contained in:
parent
3bbb78f779
commit
d57d0d9305
1 changed files with 7 additions and 3 deletions
|
@ -182,9 +182,13 @@ local value, whether or not it's permanent-local. Therefore, we cycle
|
||||||
(when (fontp doom-variable-pitch-font)
|
(when (fontp doom-variable-pitch-font)
|
||||||
(set-face-attribute 'variable-pitch frame :font doom-variable-pitch-font)))
|
(set-face-attribute 'variable-pitch frame :font doom-variable-pitch-font)))
|
||||||
('error
|
('error
|
||||||
(lwarn 'doom-ui :error
|
(if (string-prefix-p "Font not available: " (error-message-string ex))
|
||||||
"Failed to set fonts because %s"
|
(lwarn 'doom-ui :warning
|
||||||
(error-message-string ex))))
|
"Could not find the '%s' font on your system, falling back to system font"
|
||||||
|
(font-get (caddr ex) :family))
|
||||||
|
(lwarn 'doom-ui :error
|
||||||
|
"Unexpected error while initializing fonts: %s"
|
||||||
|
(error-message-string ex)))))
|
||||||
(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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue