Fix font loading in daemon-spawned frames
set-face-attribute wasn't reliable for changing the fixed-pitch and variable-pitch faces. custom-set-faces uses a custom, internal user theme that has the highest precedence, making this the superior choice for default font-setting.
This commit is contained in:
parent
da6ce8e3f9
commit
2908a6389e
1 changed files with 7 additions and 7 deletions
|
@ -555,16 +555,16 @@ frame's window-system, the theme will be reloaded.")
|
|||
"Initialize fonts."
|
||||
(condition-case-unless-debug ex
|
||||
(progn
|
||||
(when (fontp doom-font)
|
||||
(map-put default-frame-alist 'font (font-xlfd-name doom-font))
|
||||
(set-face-attribute 'fixed-pitch nil :font doom-font))
|
||||
(custom-set-faces
|
||||
(when (fontp doom-font)
|
||||
(map-put default-frame-alist 'font (font-xlfd-name doom-font))
|
||||
`(fixed-pitch ((t (:font ,doom-font)))))
|
||||
(when (fontp doom-variable-pitch-font)
|
||||
`(variable-pitch ((t (:font ,doom-variable-pitch-font))))))
|
||||
;; Fallback to `doom-unicode-font' for Unicode characters
|
||||
(when (fontp doom-unicode-font)
|
||||
(setq use-default-font-for-symbols nil)
|
||||
(set-fontset-font t 'unicode doom-unicode-font nil))
|
||||
;; ...and for variable-pitch-mode:
|
||||
(when (fontp doom-variable-pitch-font)
|
||||
(set-face-attribute 'variable-pitch nil :font doom-variable-pitch-font)))
|
||||
(set-fontset-font t 'unicode doom-unicode-font nil)))
|
||||
('error
|
||||
(if (string-prefix-p "Font not available: " (error-message-string ex))
|
||||
(lwarn 'doom-ui :warning
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue