From ab8f63afbf5cb53e954c308e80d19e48b917e689 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 24 Feb 2021 17:42:03 -0600 Subject: Add variable-pitch fonts --- config.org | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/config.org b/config.org index 3b0cb9d..2fe07ae 100644 --- a/config.org +++ b/config.org @@ -385,6 +385,10 @@ On Linux, I have a custom build of Iosevka that I like. (set-face-attribute 'fixed-pitch nil :family "Iosevka Acdw" :height 105) + + (set-face-attribute 'variable-pitch nil + :family "DejaVu Serif" + :height 110) #+end_src But on Windows, I use Consolas. @@ -397,6 +401,10 @@ But on Windows, I use Consolas. (set-face-attribute 'fixed-pitch nil :family "Consolas" :height 100) + + (set-face-attribute 'variable-pitch nil + :family "Cambria" + :height 105) #+end_src *** Underlines @@ -512,7 +520,13 @@ issue. (blackout 'form-feed-mode) #+end_src -** Theming +*** =variable-pitch= fonts in =text-mode= + +#+begin_src emacs-lisp :noweb-ref modes + (add-hook 'text-mode-hook #'variable-pitch-mode) +#+end_src + +** Theme *** Modus themes :package: @@ -535,6 +549,25 @@ I want the git version. modus-themes-mode-line nil) #+end_src +**** Force headings to be =fixed-pitch= + +To enable the proper alignment of Org tags, I want headings to inherit from the +=fixed-pitch= family as well as themselves. This paves the way to enable +=variable-pitch-mode= in Emacs. + +#+begin_src emacs-lisp :noweb-ref settings + (dolist (face '(modus-theme-heading-1 + modus-theme-heading-2 + modus-theme-heading-3 + modus-theme-heading-4 + modus-theme-heading-5 + modus-theme-heading-6 + modus-theme-heading-7 + modus-theme-heading-8)) + (doremi-face-set face + '((t (:inherit (face fixed-pitch bold)))))) +#+end_src + *** Change themes based on time of day #+begin_src emacs-lisp :noweb-ref functions -- cgit 1.4.1-21-gabe81