From 6c0d10afa4fc8bfe8e53d327aa7fbcf445eef8be Mon Sep 17 00:00:00 2001 From: John Doty Date: Tue, 24 May 2016 11:26:42 -0700 Subject: [PATCH] New favorite font --- .emacs.d/core.el | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.emacs.d/core.el b/.emacs.d/core.el index 28b27f1..0e88496 100644 --- a/.emacs.d/core.el +++ b/.emacs.d/core.el @@ -151,14 +151,18 @@ ;; Consolas. (And, to a lesser extent, Inconsolata.) ;; (require 'cl) -(defun font-existsp (font) - (if (and (fboundp 'x-list-fonts) (null (x-list-fonts font))) - nil t)) +(defun font-candidate (&rest fonts) + "Return existing font which first match." + (find-if (lambda (f) (find-font (font-spec :name f))) fonts)) (setq my-font-choice - (find-if - 'font-existsp - '("Consolas-11" "Inconsolata-11"))) + (font-candidate + "Input Mono-12:weight=light" + "Consolas-10" + "Inconsolata-11")) + +;; This is just here for playing with things. +;; (set-frame-font my-font-choice) ;; ;; To obtain new font string, execute eval-expression, and eval this: @@ -184,9 +188,6 @@ (width . 91) (height . ,jd-frame-height))) -;; This is just here for playing with things. -;; (set-frame-font my-font-choice) - ;; COLORZ! ;; (if (display-graphic-p)