summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2016-10-02 18:22:06 +0200
committerAlan Pearce2016-10-02 18:22:06 +0200
commit779a06009887201ca50ade43feda540fbaa690b5 (patch)
tree342aee4f84fbc5f0107d3172339b6e1904a3dcde
parent987c7b55294c59c289b2440ba4d4c33a8126402f (diff)
downloadnixfiles-779a06009887201ca50ade43feda540fbaa690b5.tar.lz
nixfiles-779a06009887201ca50ade43feda540fbaa690b5.tar.zst
nixfiles-779a06009887201ca50ade43feda540fbaa690b5.zip
Emacs: Use builtin function to create font-spec
-rw-r--r--tag-emacs/emacs.d/init.org9
1 files changed, 3 insertions, 6 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 405ef131..562d275b 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -155,17 +155,14 @@ because I manage those in my [[file:~/projects/dotfiles/tag-xresources/xresource
 	  (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)))
+		(let ((default-font (font-spec :name mono-face :size  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))))
+		(set-face-font 'variable-pitch (font-spec :name variable-face :size variable-font-size))))
 
 	(defun ap/set-fonts-according-to-system ()
 	  (interactive)
@@ -178,7 +175,7 @@ because I manage those in my [[file:~/projects/dotfiles/tag-xresources/xresource
 			  (ap/set-fonts "SF Mono" 12 "Lucida Grande" 12)
 			(ap/set-fonts "ProggyTiny" 11 "Lucida Grande" 12))))
 	   ((eq window-system 'x)
-		(ap/set-fonts "Terminus" 10 "Lucida" 10))))
+		(ap/set-fonts "Terminus" 12 "Lucida" 10))))
 
 	(ap/set-fonts-according-to-system))
 #+END_SRC