From 94eb4246c75760f6f724b45403dc2811dc609d65 Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Thu, 11 Apr 2024 08:59:06 +1200 Subject: [PATCH] emacs: use Roboto Mono as fixed-pitch font --- .emacs.d/init.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 5389b7d..059957a 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -154,11 +154,16 @@ (package-install 'magit) ;; fonts -(add-to-list 'default-frame-alist '(font . "Iosevka")) -(set-face-attribute 'default t :height 140) -(set-face-attribute 'fixed-pitch t :family "Iosevka") -(set-face-attribute 'variable-pitch t :family "Roboto") -(set-face-attribute 'fixed-pitch-serif t :family "Roboto Mono" :weight 'regular) +(let + ((font-fixed "Roboto Mono") + (font-varpt "Roboto")) + (add-to-list 'default-frame-alist '(font . "Roboto Mono")) + (set-face-attribute 'default t :height 140) + (set-face-attribute 'fixed-pitch t :family font-fixed) + (set-face-attribute 'variable-pitch t :family font-varpt) + (set-face-attribute 'fixed-pitch-serif t + :family font-fixed + :weight 'regular)) ;; make comments italic (set-face-attribute 'font-lock-comment-face t :slant 'italic) (set-face-attribute 'font-lock-keyword-face t :slant 'italic)