summary refs log tree commit diff stats
path: root/tag-emacs
diff options
context:
space:
mode:
authorAlan Pearce2016-09-21 13:31:32 +0200
committerAlan Pearce2016-09-21 13:40:54 +0200
commitd7dba4cfd5b335ae9b55c5abd58298ca6ef7af97 (patch)
treea05702bbd5e8490098b4a5f8129e4a7a891d1515 /tag-emacs
parentb9b86fcefd2bd47d8b42a7f48af4f4c1ea9f72d9 (diff)
downloaddotfiles-d7dba4cfd5b335ae9b55c5abd58298ca6ef7af97.tar.lz
dotfiles-d7dba4cfd5b335ae9b55c5abd58298ca6ef7af97.tar.zst
dotfiles-d7dba4cfd5b335ae9b55c5abd58298ca6ef7af97.zip
Emacs: Resize fonts on linux
Changing the specification of the font size caused the size to change
somehow.  This makes the fonts the same real size as before.
Diffstat (limited to 'tag-emacs')
-rw-r--r--tag-emacs/emacs.d/init.org66
1 files changed, 33 insertions, 33 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 19646d8..9949874 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -148,39 +148,39 @@ When possible, set up fonts.  I don’t have any settings here for X11,
 because I manage those in my [[file:~/projects/dotfiles/tag-xresources/xresources/main][XResources file]].
 #+BEGIN_SRC emacs-lisp
   (when (or (display-graphic-p)
-              (daemonp))
-
-      (defun use-variable-fonts ()
-        (interactive)
-        (variable-pitch-mode)
-        (setq cursor-type 'bar))
-
-      (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 (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 (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))
-         ((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 "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))))
-
-      (ap/set-fonts-according-to-system))
+			  (daemonp))
+
+	  (defun use-variable-fonts ()
+		(interactive)
+		(variable-pitch-mode)
+		(setq cursor-type 'bar))
+
+	  (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 (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 (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))
+		 ((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 "Lucida Grande" 12)
+			  (ap/set-fonts "ProggyTiny" 11 "Lucida Grande" 12))))
+		 ((eq window-system 'x)
+		  (ap/set-fonts "Source Code Pro" 13 "Input Sans" 13))))
+
+	  (ap/set-fonts-according-to-system))
 #+END_SRC
 
 Reduce font decoration.  I’m trying to see whether this helps me focus