fix: blank frame on can't-find-font error during startup
Due to our inhibit-redisplay hack, a missing font could lead to a blank Emacs after startup. This change fixes that so that not only is an error emitted when Emacs can't find your font, but the error will be a little more readable. This is a stopgap solution until I finish a better one I'm preparing for v3. Fix: #7055
This commit is contained in:
parent
7a3773484b
commit
98d753e103
1 changed files with 18 additions and 12 deletions
|
@ -524,6 +524,7 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
|
|||
(fixed-pitch . ,doom-font)
|
||||
(fixed-pitch-serif . ,doom-serif-font)
|
||||
(variable-pitch . ,doom-variable-pitch-font)))
|
||||
(condition-case e
|
||||
(when-let* ((face (car map))
|
||||
(font (cdr map)))
|
||||
(dolist (frame (frame-list))
|
||||
|
@ -535,7 +536,12 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
|
|||
;; Don't save to `customized-face' so it's omitted from `custom-file'
|
||||
;;(put face 'customized-face new-specs)
|
||||
(custom-push-theme 'theme-face face 'user 'set new-specs)
|
||||
(put face 'face-modified nil))))
|
||||
(put face 'face-modified nil)))
|
||||
('error
|
||||
(ignore-errors (doom--reset-inhibited-vars-h))
|
||||
(if (string-prefix-p "Font not available" (error-message-string e))
|
||||
(signal 'doom-font-error (list (font-get (cdr map) :family)))
|
||||
(signal (car e) (cdr e))))))
|
||||
(when (fboundp 'set-fontset-font)
|
||||
(let* ((fn (doom-rpartial #'member (font-family-list)))
|
||||
(symbol-font (or doom-symbol-font
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue