From 60a960b4fe003232ae06a699c62196d241db8682 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Wed, 1 Feb 2023 08:09:01 -0800 Subject: [PATCH] Different fonts for body and org headers Yeah it seemed that I should define the font in one file and use it in another. Normally, this wouldn't fly. --- ha-display.org | 14 +++++++++++--- ha-org-word-processor.org | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ha-display.org b/ha-display.org index 2df35b9..7b702a8 100644 --- a/ha-display.org +++ b/ha-display.org @@ -219,9 +219,17 @@ I probably don't need to have such a ranking system, as chances are good I have (seq-filter (lambda (font) (when (x-list-fonts font) font)) '(; Interesting idea: "Iosevka Comfy Motion Duo" "XCharter" ; https://fontesk.com/xcharter-typeface/ - "Overpass" "Source Sans Pro" - "Lucida Grande" "Verdana" - "Sans Serif"))) + "Serif"))) + (warn "Cannot find a Serif Font. Install Source Sans Pro.")))) + + (defvar ha-variable-header-font + (when window-system + (or + (seq-first + (seq-filter (lambda (font) (when (x-list-fonts font) font)) + '("Overpass" "Source Sans Pro" + "Lucida Grande" "Verdana" + "Sans Serif"))) (warn "Cannot find a Sans Serif Font. Install Source Sans Pro.")))) #+end_src diff --git a/ha-org-word-processor.org b/ha-org-word-processor.org index 701776d..483f06d 100644 --- a/ha-org-word-processor.org +++ b/ha-org-word-processor.org @@ -190,7 +190,8 @@ First step is to make all Org header levels to use the variable font, and be the (let ((default-color (face-attribute 'default :foreground))) (dolist (face '(org-level-1 org-level-2 org-level-3 org-level-4 org-level-5 org-level-6 org-level-7 org-level-8)) (set-face-attribute face nil :height 1.1 - :foreground default-color :weight 'bold :font ha-variable-font)))) + :foreground default-color :weight 'bold + :font ha-variable-header-font)))) #+end_src Next, we just need to change the header sizes: