diff options
author | Martin Polden <martin.polden@gmail.com> | 2015-05-02 20:38:05 +0200 |
---|---|---|
committer | Martin Polden <martin.polden@gmail.com> | 2015-05-02 20:38:05 +0200 |
commit | 4604e4a8f0beb269be2e5e86d32558a01a025243 (patch) | |
tree | 892f351d139a3a233766c3323b9841689e2b3cfa | |
parent | 90a57e97b36f92e9a184e5b9d8de3bff03aca762 (diff) |
Only set font if it exists
-rw-r--r-- | lisp/init-mac.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/init-mac.el b/lisp/init-mac.el index 3e41a5f..3235a68 100644 --- a/lisp/init-mac.el +++ b/lisp/init-mac.el @@ -1,7 +1,9 @@ -;; set font -(when (display-graphic-p) - (set-face-attribute 'default nil :family "Source Code Pro") - (set-face-attribute 'default nil :height 140)) +;; use source code pro font if available +;; https://github.com/adobe-fonts/source-code-pro +(let ((font-family "Source Code Pro")) + (when (and (display-graphic-p) (member font-family (font-family-list))) + (set-face-attribute 'default nil :family font-family) + (set-face-attribute 'default nil :height 140))) ;; configure modifiers (setq mac-option-modifier 'super) |