diff --git a/core/core-fonts-support.el b/core/core-fonts-support.el index 8da498fe55c8..ebe00726d70e 100644 --- a/core/core-fonts-support.el +++ b/core/core-fonts-support.el @@ -49,7 +49,16 @@ The return value is nil if no font was found, truthy otherwise." :powerline-offset)) (fontspec (apply 'font-spec :name font font-props))) (spacemacs-buffer/message "Setting font \"%s\"..." font) - (set-frame-font fontspec nil t) + ;; We set the INHIBIT-CUSTOMIZE parameter to t to tell set-frame-font + ;; not to fiddle with the default face in the user's Customization + ;; settings. We don't need Customization because our way of ensuring + ;; that the font is applied to future frames is to modify + ;; default-frame-alist, and Customization causes issues, see + ;; https://github.com/syl20bnr/spacemacs/issues/5353. + ;; INHIBIT-CUSTOMIZE is only present in recent emacs versions. + (if (version< emacs-version "28.0.90") + (set-frame-font fontspec nil t) + (set-frame-font fontspec nil t t)) (push `(font . ,(frame-parameter nil 'font)) default-frame-alist) ;; fallback font for unicode characters used in spacemacs (pcase system-type