Doom: Font selection

Add Fira Code as default, but fallback to monospace if unavailable.
This commit is contained in:
2021-05-26 13:03:53 -07:00
parent b3c598b297
commit 62ab79fd6d

View File

@@ -20,13 +20,19 @@
;; ;;
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd ;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
;; font string. You generally only need these two: ;; font string. You generally only need these two:
(setq doom-font (font-spec :family "monospace" :size 14)) (require 'cl-lib)
(setq font-candidates
(list
(font-spec :family "Fira Code Regular Nerd Font Complete Mono")
(font-spec :family "monospace" :size 14)))
(setq doom-font (cl-find-if #'find-font font-candidates))
;; There are two ways to load a theme. Both assume the theme is installed and ;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the ;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default: ;; `load-theme' function. This is the default:
(setq doom-theme 'doom-one) (setq doom-theme 'doom-one)
;; Initial frame size ;; Initial frame size
(add-to-list 'default-frame-alist '(width . 125)) (add-to-list 'default-frame-alist '(width . 125))
(add-to-list 'default-frame-alist '(height . 70)) (add-to-list 'default-frame-alist '(height . 70))