From 6dcb9386eb92377f0b9ecd82e510333f56b6305f Mon Sep 17 00:00:00 2001 From: John Doty Date: Sat, 22 Mar 2014 09:16:20 -0700 Subject: [PATCH] Better fonts --- .emacs.d/init.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index d041835..dceccd5 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -106,7 +106,16 @@ ;; Consolas. ;; -(setq my-font-choice "Consolas-11") +(require 'cl) +(defun font-existsp (font) + (if (null (x-list-fonts font)) + nil t)) + +(setq my-font-choice + (find-if + 'font-existsp + '("Consolas-11" "Inconsolata-11"))) + ;; ;; To obtain new font string, execute eval-expression, and eval this: ;;(insert(prin1-to-string(w32-select-font)))