From 4d1e1cc4f7fda4328127aa8557ae57cfe3a57557 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sun, 12 Apr 2020 15:36:57 -0400 Subject: [PATCH] Only set "Hack" font as default if it is availible --- .emacs.d/fred-theme.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.emacs.d/fred-theme.el b/.emacs.d/fred-theme.el index a95679f..8ad3ea3 100644 --- a/.emacs.d/fred-theme.el +++ b/.emacs.d/fred-theme.el @@ -9,7 +9,9 @@ (custom-theme-set-faces 'fred - '(default ((default (:foundry "SRC" :family "Hack" :height 110)) + ;; check if "Hack" font is availible before setting it + `(default ((default ,(let ((font '(:foundry "SRC" :family "Hack" :height 110))) + (when (find-font (apply 'font-spec font)) font))) (((class color) (min-colors 4096)) (:foreground "#eeeeec" :background "#151515")) (((class color) (min-colors 256)) (:foreground "#eeeeec" :background "#222")) (((class color) (min-colors 89)) (:foreground "#eeeeec" :background "black"))))