diff --git a/core/core-dotspacemacs.el b/core/core-dotspacemacs.el index a52b4f7d0982..e35594fa8b3f 100644 --- a/core/core-dotspacemacs.el +++ b/core/core-dotspacemacs.el @@ -366,8 +366,11 @@ pressing ` m`. Set it to `nil` to disable it." :size 10.0 :weight normal :width normal) - "Default font, or prioritized list of fonts. This setting has no effect when -running Emacs in terminal." + "Default font or prioritized list of fonts. This setting has no effect when +running Emacs in terminal. The font set here will be used for default and +fixed-pitch faces. The `:size' can be specified as +a non-negative integer (pixel size), or a floating-point (point size). +Point size is recommended, because it's device independent. (default 10.0)" '(choice (cons string sexp) (repeat (cons string sexp))) 'spacemacs-dotspacemacs-init) diff --git a/core/core-fonts-support.el b/core/core-fonts-support.el index f4d5d5b983db..4fe0c8f3e6d7 100644 --- a/core/core-fonts-support.el +++ b/core/core-fonts-support.el @@ -55,11 +55,15 @@ The return value is nil if no font was found, truthy otherwise." ;; 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. + ;; 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) + + ;; Make sure that our font is used for fixed-pitch face as well + (set-face-attribute 'fixed-pitch nil :family 'unspecified) + ;; fallback font for unicode characters used in spacemacs (pcase system-type (`gnu/linux diff --git a/core/templates/.spacemacs.template b/core/templates/.spacemacs.template index 28ef37d3eff8..4005dbd059b6 100644 --- a/core/templates/.spacemacs.template +++ b/core/templates/.spacemacs.template @@ -253,7 +253,9 @@ It should only modify the values of Spacemacs settings." ;; (default t) dotspacemacs-colorize-cursor-according-to-state t - ;; Default font or prioritized list of fonts. The `:size' can be specified as + ;; Default font or prioritized list of fonts. This setting has no effect when + ;; running Emacs in terminal. The font set here will be used for default and + ;; fixed-pitch faces. The `:size' can be specified as ;; a non-negative integer (pixel size), or a floating-point (point size). ;; Point size is recommended, because it's device independent. (default 10.0) dotspacemacs-default-font '("Source Code Pro" diff --git a/doc/DOCUMENTATION.org b/doc/DOCUMENTATION.org index a00687cff35b..0c04b4502777 100644 --- a/doc/DOCUMENTATION.org +++ b/doc/DOCUMENTATION.org @@ -1226,7 +1226,8 @@ The default font used by Spacemacs is [[https://github.com/adobe-fonts/source-co recommended to install it on your system if you wish to use it. To change the default font set the variable =dotspacemacs-default-font= in your -=.spacemacs= file. By default its value is: +=.spacemacs= file, this setting will be used for the =default= and =fixed-pitch= faces. +By default its value is: #+BEGIN_SRC emacs-lisp (setq-default dotspacemacs-default-font '("Source Code Pro"