From 62ab79fd6d2003697fa9668a7b5f059b923220f2 Mon Sep 17 00:00:00 2001 From: Tim McCarthy Date: Wed, 26 May 2021 13:03:53 -0700 Subject: [PATCH] Doom: Font selection Add Fira Code as default, but fallback to monospace if unavailable. --- doom/config.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/doom/config.el b/doom/config.el index f296769..1a082a6 100644 --- a/doom/config.el +++ b/doom/config.el @@ -20,13 +20,19 @@ ;; ;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd ;; 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 ;; available. You can either set `doom-theme' or manually load a theme with the ;; `load-theme' function. This is the default: (setq doom-theme 'doom-one) - ;; Initial frame size (add-to-list 'default-frame-alist '(width . 125)) (add-to-list 'default-frame-alist '(height . 70))