New favorite font

This commit is contained in:
John Doty 2016-05-24 11:26:42 -07:00
parent a16be3025b
commit 6c0d10afa4

View file

@ -151,14 +151,18 @@
;; Consolas. (And, to a lesser extent, Inconsolata.) ;; Consolas. (And, to a lesser extent, Inconsolata.)
;; ;;
(require 'cl) (require 'cl)
(defun font-existsp (font) (defun font-candidate (&rest fonts)
(if (and (fboundp 'x-list-fonts) (null (x-list-fonts font))) "Return existing font which first match."
nil t)) (find-if (lambda (f) (find-font (font-spec :name f))) fonts))
(setq my-font-choice (setq my-font-choice
(find-if (font-candidate
'font-existsp "Input Mono-12:weight=light"
'("Consolas-11" "Inconsolata-11"))) "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: ;; To obtain new font string, execute eval-expression, and eval this:
@ -184,9 +188,6 @@
(width . 91) (width . 91)
(height . ,jd-frame-height))) (height . ,jd-frame-height)))
;; This is just here for playing with things.
;; (set-frame-font my-font-choice)
;; COLORZ! ;; COLORZ!
;; ;;
(if (display-graphic-p) (if (display-graphic-p)