Only set "Hack" font as default if it is availible

This commit is contained in:
Adam Goldsmith 2020-04-12 15:36:57 -04:00
parent 0955beffec
commit 4d1e1cc4f7
1 changed files with 3 additions and 1 deletions

View File

@ -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"))))