From e1659c9312f92b4e110f88f4acca9b482a3c3e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Schwarz=C3=A4ugl?= Date: Mon, 23 Mar 2026 20:59:11 +0100 Subject: [PATCH] chore[work]: improve fonts for presentations --- SwarselSystems.org | 80 ++++++++++++++++++++------------ files/emacs/early-init.el | 1 + files/emacs/init.el | 54 ++++++++++++++------- modules/home/common/packages.nix | 5 +- modules/shared/vars.nix | 16 ++++--- nix/overlays.nix | 2 - 6 files changed, 99 insertions(+), 59 deletions(-) diff --git a/SwarselSystems.org b/SwarselSystems.org index ec90f75..9b5a3c3 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -3304,8 +3304,6 @@ On the structure of overlays: as you notice, all of the attributes within overla "libreoffice" "libreoffice-qt" "nerd-fonts-symbols-only" - "noto-fonts" - "noto-fonts-cjk-sans" "noto-fonts-color-emoji" # "pipewire" "podman" @@ -21033,13 +21031,12 @@ This holds packages that I can use as provided, or with small modifications (as }) # font stuff - nerd-fonts.fira-mono + cantarell-fonts nerd-fonts.fira-code + (iosevka-bin.override { variant = "Aile"; }) nerd-fonts.symbols-only noto-fonts-color-emoji font-awesome_5 - noto-fonts - noto-fonts-cjk-sans ]; }; } @@ -28495,23 +28492,27 @@ In short, the options defined here are passed to the modules systems using =_mod }; serif = { # package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; }); - package = pkgs.cantarell-fonts; + # package = pkgs.cantarell-fonts; # package = pkgs.montserrat; - name = "Cantarell"; + # name = "Cantarell"; + package = pkgs.iosevka-bin.override { variant = "Aile"; }; + name = "Iosevka Aile"; # name = "FiraCode Nerd Font Propo"; # name = "Montserrat"; }; sansSerif = { # package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; }); - package = pkgs.cantarell-fonts; + # package = pkgs.cantarell-fonts; # package = pkgs.montserrat; - name = "Cantarell"; + # name = "Cantarell"; + package = pkgs.iosevka-bin.override { variant = "Aile"; }; + name = "Iosevka Aile"; # name = "FiraCode Nerd Font Propo"; # name = "Montserrat"; }; monospace = { - package = pkgs.nerd-fonts.fira-mono; # has overrides - name = "FiraCode Nerd Font Mono"; + package = pkgs.nerd-fonts.fira-code; # has overrides + name = "FiraCode Nerd Font"; }; emoji = { package = pkgs.noto-fonts-color-emoji; @@ -31745,6 +31746,7 @@ For the =default-frame-alist=, I used to also set ='(right-divider-width . 4)= a '(undecorated . t) ; no title bar, borders etc. '(background-color . "#1D252C") ; load doom-citylight colors to avoid white flash '(foreground-color . "#A0B3C5") ; load doom-citylight colors to avoid white flash + '(font . "FiraCode Nerd Font") '(vertical-scroll-bars . nil) '(horizontal-scroll-bars . nil) '(internal-border-width . 5) @@ -32560,9 +32562,6 @@ Here I set up some things that are too minor to put under other categories. (set-language-environment "UTF-8") ;; (profiler-start 'cpu) ;; set default font size - (defvar swarsel/default-font-size 130) - (setq swarsel-standard-font "FiraCode Nerd Font Mono" - swarsel-alt-font "FiraCode Nerd Font Mono") ;; (defalias 'yes-or-no-p 'y-or-n-p) ;;(setq-default show-trailing-whitespace t) @@ -32917,18 +32916,12 @@ Here I define my fonts to be used. Honestly I do not understand the face-attribu #+begin_src emacs-lisp - (dolist (face '(default fixed-pitch)) - (set-face-attribute face nil - :font "FiraCode Nerd Font Mono")) - (add-to-list 'default-frame-alist '(font . "FiraCode Nerd Font Mono")) + (setq swarsel/fixed-font "FiraCode Nerd Font" + swarsel/variable-font "Iosevka Aile") - (set-face-attribute 'default nil :height 100) - (set-face-attribute 'fixed-pitch nil :height 1.0) - - (set-face-attribute 'variable-pitch nil - :family "IBM Plex Sans" - :weight 'regular - :height 1.06) + (set-face-attribute 'default nil :font swarsel/fixed-font :height 100) + (set-face-attribute 'fixed-pitch nil :font swarsel/fixed-font :height 130) + (set-face-attribute 'variable-pitch nil :font swarsel/variable-font :weight 'light :height 130) #+end_src @@ -33443,6 +33436,7 @@ This part of the configuration mostly makes some aesthetic changes, enables neat (org-html-htmlize-output-type nil) (org-fold-core-style 'overlays) (org-src-preserve-indentation nil) + (org-src-fontify-natively t) (org-export-with-broken-links 'mark) (org-confirm-babel-evaluate nil) :config @@ -33453,6 +33447,7 @@ This part of the configuration mostly makes some aesthetic changes, enables neat (setq org-support-shift-select t) (setq org-agenda-start-with-log-mode t) + (setq org-fontify-quote-and-verse-blocks t) (setq org-log-done 'time) (setq org-log-into-drawer t) (setq org-startup-with-inline-images t) @@ -33481,6 +33476,28 @@ This part of the configuration mostly makes some aesthetic changes, enables neat (js . t) (shell . t))) + (set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch) + (set-face-attribute 'org-table nil :inherit 'fixed-pitch) + (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) + (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) + (set-face-attribute 'org-quote nil :inherit '(shadow fixed-pitch)) + (set-face-attribute 'org-verse nil :inherit '(shadow fixed-pitch)) + (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch)) + (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch)) + (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch)) + (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch) + + + (dolist (face '((org-level-1 . 1.2) + (org-level-2 . 1.1) + (org-level-3 . 1.0) + (org-level-4 . 1.0) + (org-level-5 . 1.0) + (org-level-6 . 1.0) + (org-level-7 . 1.0) + (org-level-8 . 1.0))) + (set-face-attribute (car face) nil :font swarsel/variable-font :weight 'medium :height (cdr face))) + (add-to-list 'org-src-lang-modes '("conf-unix" . conf-unix)) (advice-add 'org-babel-tangle-single-block :around #'swarsel/org-babel-tangle-single-block-advice) @@ -33589,7 +33606,7 @@ This just makes org-mode a little bit more beautiful, mostly by making the =begi #+end_src -**** Presentations +**** Presentations (org-present) :PROPERTIES: :CUSTOM_ID: h:4e11a845-a7bb-4eb5-b4ce-5b2f52e07425 :END: @@ -33620,8 +33637,11 @@ When holding presentations, I think it is important to not have too many distrac (setq-local face-remapping-alist '((default (:height 1.5) variable-pitch) (header-line (:height 4.0) variable-pitch) (org-document-title (:height 1.75) org-document-title) - (org-code (:height 1.55) org-code) - (org-verbatim (:height 1.55) org-verbatim) + (org-code (:height 1.2) org-code) + (org-verbatim (:height 1.0) org-verbatim) + (org-quote (:height 1.0) org-quote) + (org-verse (:height 1.0) org-verse) + (org-table (:height 0.8) org-table) (org-block (:height 1.25) org-block) (org-block-begin-line (:height 0.7) org-block) )) @@ -33633,7 +33653,7 @@ When holding presentations, I think it is important to not have too many distrac (org-level-6 . 1.2) (org-level-7 . 1.2) (org-level-8 . 1.2))) - (set-face-attribute (car face) nil :font swarsel-alt-font :weight 'medium :height (cdr face))) + (set-face-attribute (car face) nil :font swarsel/variable-font :weight 'medium :height (cdr face))) (setq header-line-format " ") (setq visual-fill-column-width 90) @@ -33661,7 +33681,7 @@ When holding presentations, I think it is important to not have too many distrac (org-level-6 . 0.9) (org-level-7 . 0.9) (org-level-8 . 0.9))) - (set-face-attribute (car face) nil :font swarsel-alt-font :weight 'medium :height (cdr face))) + (set-face-attribute (car face) nil :font swarsel/variable-font :weight 'medium :height (cdr face))) (setq header-line-format nil) (setq visual-fill-column-width 150) (setq indicate-buffer-boundaries t) diff --git a/files/emacs/early-init.el b/files/emacs/early-init.el index de4015e..891965d 100644 --- a/files/emacs/early-init.el +++ b/files/emacs/early-init.el @@ -46,6 +46,7 @@ '(undecorated . t) ; no title bar, borders etc. '(background-color . "#1D252C") ; load doom-citylight colors to avoid white flash '(foreground-color . "#A0B3C5") ; load doom-citylight colors to avoid white flash + '(font . "FiraCode Nerd Font") '(vertical-scroll-bars . nil) '(horizontal-scroll-bars . nil) '(internal-border-width . 5) diff --git a/files/emacs/init.el b/files/emacs/init.el index b42ef75..b412785 100644 --- a/files/emacs/init.el +++ b/files/emacs/init.el @@ -465,9 +465,6 @@ create a new one." (set-language-environment "UTF-8") ;; (profiler-start 'cpu) ;; set default font size -(defvar swarsel/default-font-size 130) -(setq swarsel-standard-font "FiraCode Nerd Font Mono" - swarsel-alt-font "FiraCode Nerd Font Mono") ;; (defalias 'yes-or-no-p 'y-or-n-p) ;;(setq-default show-trailing-whitespace t) @@ -655,18 +652,12 @@ create a new one." ;; set the NixOS wordlist by hand (setq ispell-alternate-dictionary (getenv "WORDLIST")) -(dolist (face '(default fixed-pitch)) - (set-face-attribute face nil - :font "FiraCode Nerd Font Mono")) -(add-to-list 'default-frame-alist '(font . "FiraCode Nerd Font Mono")) +(setq swarsel/fixed-font "FiraCode Nerd Font" + swarsel/variable-font "Iosevka Aile") -(set-face-attribute 'default nil :height 100) -(set-face-attribute 'fixed-pitch nil :height 1.0) - -(set-face-attribute 'variable-pitch nil - :family "IBM Plex Sans" - :weight 'regular - :height 1.06) +(set-face-attribute 'default nil :font swarsel/fixed-font :height 100) +(set-face-attribute 'fixed-pitch nil :font swarsel/fixed-font :height 130) +(set-face-attribute 'variable-pitch nil :font swarsel/variable-font :weight 'light :height 130) (use-package solaire-mode :custom @@ -925,6 +916,7 @@ create a new one." (org-html-htmlize-output-type nil) (org-fold-core-style 'overlays) (org-src-preserve-indentation nil) + (org-src-fontify-natively t) (org-export-with-broken-links 'mark) (org-confirm-babel-evaluate nil) :config @@ -935,6 +927,7 @@ create a new one." (setq org-support-shift-select t) (setq org-agenda-start-with-log-mode t) + (setq org-fontify-quote-and-verse-blocks t) (setq org-log-done 'time) (setq org-log-into-drawer t) (setq org-startup-with-inline-images t) @@ -963,6 +956,28 @@ create a new one." (js . t) (shell . t))) + (set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch) + (set-face-attribute 'org-table nil :inherit 'fixed-pitch) + (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) + (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) + (set-face-attribute 'org-quote nil :inherit '(shadow fixed-pitch)) + (set-face-attribute 'org-verse nil :inherit '(shadow fixed-pitch)) + (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch)) + (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch)) + (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch)) + (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch) + + + (dolist (face '((org-level-1 . 1.2) + (org-level-2 . 1.1) + (org-level-3 . 1.0) + (org-level-4 . 1.0) + (org-level-5 . 1.0) + (org-level-6 . 1.0) + (org-level-7 . 1.0) + (org-level-8 . 1.0))) + (set-face-attribute (car face) nil :font swarsel/variable-font :weight 'medium :height (cdr face))) + (add-to-list 'org-src-lang-modes '("conf-unix" . conf-unix)) (advice-add 'org-babel-tangle-single-block :around #'swarsel/org-babel-tangle-single-block-advice) @@ -1033,8 +1048,11 @@ create a new one." (setq-local face-remapping-alist '((default (:height 1.5) variable-pitch) (header-line (:height 4.0) variable-pitch) (org-document-title (:height 1.75) org-document-title) - (org-code (:height 1.55) org-code) - (org-verbatim (:height 1.55) org-verbatim) + (org-code (:height 1.2) org-code) + (org-verbatim (:height 1.0) org-verbatim) + (org-quote (:height 1.0) org-quote) + (org-verse (:height 1.0) org-verse) + (org-table (:height 0.8) org-table) (org-block (:height 1.25) org-block) (org-block-begin-line (:height 0.7) org-block) )) @@ -1046,7 +1064,7 @@ create a new one." (org-level-6 . 1.2) (org-level-7 . 1.2) (org-level-8 . 1.2))) - (set-face-attribute (car face) nil :font swarsel-alt-font :weight 'medium :height (cdr face))) + (set-face-attribute (car face) nil :font swarsel/variable-font :weight 'medium :height (cdr face))) (setq header-line-format " ") (setq visual-fill-column-width 90) @@ -1074,7 +1092,7 @@ create a new one." (org-level-6 . 0.9) (org-level-7 . 0.9) (org-level-8 . 0.9))) - (set-face-attribute (car face) nil :font swarsel-alt-font :weight 'medium :height (cdr face))) + (set-face-attribute (car face) nil :font swarsel/variable-font :weight 'medium :height (cdr face))) (setq header-line-format nil) (setq visual-fill-column-width 150) (setq indicate-buffer-boundaries t) diff --git a/modules/home/common/packages.nix b/modules/home/common/packages.nix index 40cb0b9..dc7f04f 100644 --- a/modules/home/common/packages.nix +++ b/modules/home/common/packages.nix @@ -171,13 +171,12 @@ }) # font stuff - nerd-fonts.fira-mono + cantarell-fonts nerd-fonts.fira-code + (iosevka-bin.override { variant = "Aile"; }) nerd-fonts.symbols-only noto-fonts-color-emoji font-awesome_5 - noto-fonts - noto-fonts-cjk-sans ]; }; } diff --git a/modules/shared/vars.nix b/modules/shared/vars.nix index ce25ff7..869d26c 100644 --- a/modules/shared/vars.nix +++ b/modules/shared/vars.nix @@ -37,23 +37,27 @@ }; serif = { # package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; }); - package = pkgs.cantarell-fonts; + # package = pkgs.cantarell-fonts; # package = pkgs.montserrat; - name = "Cantarell"; + # name = "Cantarell"; + package = pkgs.iosevka-bin.override { variant = "Aile"; }; + name = "Iosevka Aile"; # name = "FiraCode Nerd Font Propo"; # name = "Montserrat"; }; sansSerif = { # package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; }); - package = pkgs.cantarell-fonts; + # package = pkgs.cantarell-fonts; # package = pkgs.montserrat; - name = "Cantarell"; + # name = "Cantarell"; + package = pkgs.iosevka-bin.override { variant = "Aile"; }; + name = "Iosevka Aile"; # name = "FiraCode Nerd Font Propo"; # name = "Montserrat"; }; monospace = { - package = pkgs.nerd-fonts.fira-mono; # has overrides - name = "FiraCode Nerd Font Mono"; + package = pkgs.nerd-fonts.fira-code; # has overrides + name = "FiraCode Nerd Font"; }; emoji = { package = pkgs.noto-fonts-color-emoji; diff --git a/nix/overlays.nix b/nix/overlays.nix index dff0d55..8179f9f 100644 --- a/nix/overlays.nix +++ b/nix/overlays.nix @@ -108,8 +108,6 @@ in "libreoffice" "libreoffice-qt" "nerd-fonts-symbols-only" - "noto-fonts" - "noto-fonts-cjk-sans" "noto-fonts-color-emoji" # "pipewire" "podman"