Unset :weight, :slant, :width on font faces
Setting a face's `:font` attribute implicitly sets a host of other faces attributes (:family, :foundry, :width, :weight, :height, and :slant), which is problematic in places where these faces are used in tandem with other faces, like how EWW renders bold elements with both variable-pitch+bold faces, with the expectation that their attributes would cascade properly, but not so if variable-pitch sets :weight or :slant.
This commit is contained in:
parent
9da4ac05ad
commit
19203a91a3
1 changed files with 7 additions and 6 deletions
|
@ -584,12 +584,13 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
|
|||
(when doom-unicode-font
|
||||
(set-fontset-font t 'unicode doom-unicode-font))))
|
||||
(apply #'custom-set-faces
|
||||
(let ((attrs '(:weight unspecified :slant unspecified :width unspecified)))
|
||||
(append (when doom-font
|
||||
`((fixed-pitch ((t (:font ,doom-font))))))
|
||||
`((fixed-pitch ((t (:font ,doom-font ,@attrs))))))
|
||||
(when doom-serif-font
|
||||
`((fixed-pitch-serif ((t (:font ,doom-serif-font))))))
|
||||
`((fixed-pitch-serif ((t (:font ,doom-serif-font ,@attrs))))))
|
||||
(when doom-variable-pitch-font
|
||||
`((variable-pitch ((t (:font ,doom-variable-pitch-font))))))))
|
||||
`((variable-pitch ((t (:font ,doom-variable-pitch-font ,@attrs)))))))))
|
||||
;; Never save these settings to `custom-file'
|
||||
(dolist (sym '(fixed-pitch fixed-pitch-serif variable-pitch))
|
||||
(put sym 'saved-face nil))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue