diff options
-rw-r--r-- | emacs/init.el | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/emacs/init.el b/emacs/init.el index c26f3e2..d9ce462 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -123,23 +123,36 @@ Values: `desktop', `server', `laptop'") (variable-pitch-mode) (setq cursor-type 'bar)) - (if (eq window-system 'w32) - (let* ((font-size 10) - (mono-face (cond - ((member "Liberation Mono" (font-family-list)) - "Liberation Mono") - ((member "Liberation Sans Mono" (font-family-list)) - "Liberation Sans Mono") - ((member "Consolas" (font-family-list)) - "Consolas"))) - (variable-face "Segoe UI") - (default-font (concat mono-face "-" (number-to-string font-size)))) - (when mono-face - (set-face-font 'default default-font) - (set-face-font 'fixed-pitch default-font)) - (when variable-face - (set-face-font 'variable-pitch (concat variable-face "-" - (number-to-string (1+ font-size)))))))) + (cond + ((eq window-system 'w32) + (let* ((font-size 10) + (font-list (font-family-list)) + (mono-face (cond + ((member "Liberation Mono" font-list) + "Liberation Mono") + ((member "Liberation Sans Mono" font-list) + "Liberation Sans Mono") + ((member "Consolas" font-list) + "Consolas"))) + (variable-face "Segoe UI") + (default-font (concat mono-face "-" (number-to-string font-size)))) + (when mono-face + (set-face-font 'default default-font) + (set-face-font 'fixed-pitch default-font)) + (when variable-face + (set-face-font 'variable-pitch (concat variable-face "-" + (number-to-string (1+ font-size))))))) + ((eq window-system 'ns) + (let* ((font-size 14) + (font-list (font-family-list)) + (mono-face (cond + ((member "Droid Sans Mono" font-list) + "Droid Sans Mono"))) + (variable-face "Helvetica Neue") + (default-font (concat mono-face "-" (number-to-string font-size)))) + (when mono-face + (set-face-font 'default default-font) + (set-face-font 'fixed-pitch default-font)))))) (with-elapsed-timer "Setting up font styles" (let* ((font-height (face-attribute 'default :height)) |