summary refs log tree commit diff stats
path: root/tag-emacs/emacs.d
diff options
context:
space:
mode:
authorAlan Pearce2016-09-19 16:26:30 +0200
committerAlan Pearce2016-09-19 16:26:30 +0200
commit37fe9b98b9ae0b1163a547cb17134caf051ebd0c (patch)
tree905b4a4d628066031b3b141bb9d81ec0186c3f4c /tag-emacs/emacs.d
parent73407ed6716d3edcf2c3431b345b3bfcd4cf3d4b (diff)
downloadnixfiles-37fe9b98b9ae0b1163a547cb17134caf051ebd0c.tar.lz
nixfiles-37fe9b98b9ae0b1163a547cb17134caf051ebd0c.tar.zst
nixfiles-37fe9b98b9ae0b1163a547cb17134caf051ebd0c.zip
Emacs: Fix fonts in 25.1
Diffstat (limited to 'tag-emacs/emacs.d')
-rw-r--r--tag-emacs/emacs.d/init.org20
1 files changed, 10 insertions, 10 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 1ce0473f..0c9ac305 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -194,30 +194,30 @@ 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 antialias)
+      (defun format-font (name style size)
+        (format "-*-%s-%s-*-*-*-%s-*-*-*-*-*-*" name style size))
+
+      (defun ap/set-fonts (mono-face mono-font-size variable-face variable-font-size)
         (when mono-face
-          (let ((default-font (concat mono-face "-" (number-to-string mono-font-size))))
+          (let ((default-font (format-font mono-face "normal" mono-font-size)))
             (add-to-list 'default-frame-alist `(font . ,default-font))
             (set-face-font 'fixed-pitch default-font)
             (set-frame-font default-font t t)))
         (when variable-face
-          (set-face-font 'variable-pitch (concat variable-face "-"
-                                                 (number-to-string variable-font-size))))
-        (when (boundp 'ns-antialias-text)
-          (setq ns-antialias-text antialias)))
+          (set-face-font 'variable-pitch (format-font variable-face "normal" variable-font-size))))
 
       (defun ap/set-fonts-according-to-system ()
         (interactive)
         (cond
          ((eq window-system 'w32)
-          (ap/set-fonts "Liberation Mono" 11 "Segoe UI" 11 t))
+          (ap/set-fonts "Liberation Mono" 11 "Segoe UI" 11))
          ((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 "Monoid" 12 "Lucide Grande" 12 t)
-              (ap/set-fonts "ProggyTiny" 11 "Lucida Grande" 12 t))))
+                (ap/set-fonts "Monoid" 12 "Lucida Grande" 12)
+              (ap/set-fonts "ProggyTiny" 11 "Lucida Grande" 12))))
          ((eq window-system 'x)
-          (ap/set-fonts "Source Code Pro" 10 "Input Sans" 10 t))))
+          (ap/set-fonts "Source Code Pro" 10 "Input Sans" 10))))
 
       (ap/set-fonts-according-to-system))
 #+END_SRC