all repos — nixfiles @ d0f58576663d1005503cb148fc63c3cdaf620501

System and user configuration, managed by nix and home-manager

Emacs: set a variable pitch font under darwin
Alan Pearce alan@alanpearce.co.uk
Tue, 08 Oct 2013 21:34:00 +0100
commit

d0f58576663d1005503cb148fc63c3cdaf620501

parent

e3acf5d644cb1137db38e66cddbdfa87e6aa7f88

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M emacs/init.elemacs/init.el
@@ -147,7 +147,10 @@ (mono-face "Droid Sans Mono")            (variable-face "Helvetica Neue")
            (default-font (concat mono-face "-" (number-to-string font-size))))
         (when mono-face
-          (add-to-list 'default-frame-alist `(font . ,default-font)))))))
+          (add-to-list 'default-frame-alist `(font . ,default-font)))
+        (when variable-face
+          (set-face-font 'variable-pitch (concat variable-face "-"
+                                                 (number-to-string (1+ font-size)))))))))
 
 (with-elapsed-timer "Setting up font styles"
   (let* ((font-height (face-attribute 'default :height))