feat(lib): add doom-font-exists-p

For easier font detection in your config.

Ref: #5948
This commit is contained in:
Henrik Lissner 2022-01-03 18:34:01 +01:00
parent b88eb77605
commit dde20aa8fd

View file

@ -109,6 +109,12 @@ Doesn't work in terminal Emacs."
(ignore-errors (doom-adjust-font-size nil))
(signal (car e) (cdr e)))))
;;;###autoload
(defun doom-font-exists-p (font)
"Return non-nil if FONT exists on this system."
(declare (pure t) (side-effect-free t))
(ignore-errors (find-font (doom-normalize-font font))))
;;
;;; Commands