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)
|
||||
(set-face-attribute 'variable-pitch frame :font doom-variable-pitch-font)))
|
||||
('error
|
||||
(if (string-prefix-p "Font not available: " (error-message-string ex))
|
||||
(lwarn 'doom-ui :warning
|
||||
"Could not find the '%s' font on your system, falling back to system font"
|
||||
(font-get (caddr ex) :family))
|
||||
(lwarn 'doom-ui :error
|
||||
"Failed to set fonts because %s"
|
||||
(error-message-string ex))))
|
||||
"Unexpected error while initializing fonts: %s"
|
||||
(error-message-string ex)))))
|
||||
(run-hooks 'doom-init-ui-hook))
|
||||
|
||||
(defun doom|reload-ui-in-daemon (frame)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue