summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2017-01-17 11:39:17 +0100
committerAlan Pearce2017-01-17 11:39:17 +0100
commit173f06c9e467bd332754a73299c589b6fa17f664 (patch)
treec1b711461a8acdf7397079aaa4f2a9154b3755c6
parent4f655369e8e87b73e2a932091b5db84c81e7736a (diff)
downloaddotfiles-173f06c9e467bd332754a73299c589b6fa17f664.tar.lz
dotfiles-173f06c9e467bd332754a73299c589b6fa17f664.tar.zst
dotfiles-173f06c9e467bd332754a73299c589b6fa17f664.zip
Emacs: Use non-AA Monaco font on macOS
-rw-r--r--tag-emacs/emacs.d/init.org12
1 files changed, 7 insertions, 5 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 3a34b84..2207ebb 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -201,7 +201,9 @@ because I manage those in my [[file:~/projects/dotfiles/tag-xresources/xresource
     (variable-pitch-mode)
     (setq cursor-type 'bar))
 
-  (defun ap/set-fonts (mono-face mono-font-size variable-face variable-font-size)
+  (defun ap/set-fonts (mono-face mono-font-size variable-face variable-font-size antialias)
+    (if boundp 'ns-antialias-text
+      (setq ns-antialias-text antialias))
     (when mono-face
       (let ((default-font (font-spec :family mono-face :size  mono-font-size)))
         (add-to-list 'default-frame-alist `(font . ,(format "%s %s" mono-face mono-font-size)))
@@ -214,15 +216,15 @@ because I manage those in my [[file:~/projects/dotfiles/tag-xresources/xresource
     (interactive)
     (cond
      ((eq window-system 'w32)
-      (ap/set-fonts "Liberation Mono" 11 "Segoe UI" 11))
+      (ap/set-fonts "Liberation Mono" 11 "Segoe UI" 11 t))
      ((eq window-system 'ns)
       (let ((displays (string-to-number (shell-command-to-string "system_profiler SPDisplaysDataType | grep \"Online: Yes\" | wc -l"))))
         (if (eq displays 1)
-            (ap/set-fonts "SF Mono" 12 "Lucida Grande" 12)
-          (ap/set-fonts "ProggyClean" 11 "Lucida Grande" 12))))
+            (ap/set-fonts "SF Mono" 12 "Lucida Grande" 12 t)
+          (ap/set-fonts "Monaco" 10 "Lucida Grande" 12 nil))))
      ((eq window-system 'x)
       (set-fontset-font "fontset-default" 'unicode (font-spec :name "Terminus" :size 12))
-      (ap/set-fonts "Terminus" 12 "Lucida" 10))))
+      (ap/set-fonts "Terminus" 12 "Lucida" 10 nil))))
 
   (ap/set-fonts-according-to-system))
 #+END_SRC