diff --git a/config.org b/config.org index 3ef5d6d..85c0326 100644 --- a/config.org +++ b/config.org @@ -31,18 +31,21 @@ The provided default ~config.el~ ;; ;; See 'C-h v doom-font' for documentation and more examples of what they ;; accept. For example: -;; -(if (string= (system-name) "wsl") - (setq doom-font (font-spec :family "Iosevka" :size 16 :weight 'semi-light) - doom-unicode-font (font-spec :family "Iosevka" :size 16 :weight 'semi-light) - doom-variable-pitch-font (font-spec :family "Iosevka Sans Quasi" :size 19)) - (if (string= (system-name) "extremophile") - (setq doom-font (font-spec :family "Iosevka Nerd Font" :size 11 :weight 'semi-light) - doom-unicode-font (font-spec :family "Iosevka Nerd Font" :size 11 :weight 'semi-light) - doom-variable-pitch-font (font-spec :family "Iosevka Sans Quasi" :size 13)) - (setq doom-font (font-spec :family "Iosevka" :size 13 :weight 'semi-light) - doom-unicode-font (font-spec :family "Iosevka" :size 13 :weight 'semi-light) - doom-variable-pitch-font (font-spec :family "Iosevka Sans Quasi" :size 15)))) + +;; Figure out what the name and size of the font are going to be based on the system type and +;; hostname +(let ((nm/font-name (cond ((eq system-type 'darwin) "Iosevka Nerd Font") + (t "Iosevka"))) + (nm/font-size (cond ((eq system-type 'darwin) 11) + ((string= (system-name) "wsl") 16) + (t 13))) + (nm/variable-font-size (cond ((eq system-type 'darwin) 13) + ((string= (system-name) "wsl") 19) + (t 15)))) + (setq doom-font (font-spec :family nm/font-name :size nm/font-size :weight 'semi-light) + doom-unicode-font (font-spec :family nm/font-name :size nm/font-size :weight 'semi-light) + doom-variable-pitch-font (font-spec :family "Iosevka Sans Quasi" :size nm/variable-font-size))) + ;; ;; If you or Emacs can't find your font, use 'M-x describe-font' to look them ;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to