From 4fee53aae55a2cd89d24a6c90be66d5787cd8e95 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sat, 11 Sep 2021 02:55:05 -0700 Subject: [oni-gui] Fix setting `fixed-pitch' and `variable-pitch' faces Also change the `variable-pitch' font to Comic Neue[1] [1]: http://www.comicneue.com/ --- oni-gui.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'oni-gui.el') diff --git a/oni-gui.el b/oni-gui.el index c78bc3b..2a52026 100644 --- a/oni-gui.el +++ b/oni-gui.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2021.0727.144752 +;; Version: 2021.0911.025144 ;; Package-Requires: (oni-ui oni-hydra yoshi-theme diminish) ;; This program is free software; you can redistribute it and/or modify @@ -31,12 +31,14 @@ (add-to-list 'default-frame-alist '(font . "Fantasque Sans Mono-15")) (add-to-list 'default-frame-alist '(internal-border-width . 15)) -(set-face-attribute 'fixed-pitch nil :font "Fantasque Sans Mono-15") -(set-face-attribute 'variable-pitch nil :font "Space Grotesk-15:weight=medium") - (defconst oni-gui-isearch-icon ?) (defconst oni-gui-arev-icon ?) +(defun oni-gui-setup-faces (frame) + "Setup faces for FRAME." + (set-face-attribute 'fixed-pitch frame :font "Fantasque Sans Mono-15") + (set-face-attribute 'variable-pitch frame :font "Comic Neue-15")) + (defun oni-gui-setup-fontsets (frame) "Setup fontsets for FRAME. If FRAME is nil, they’re set for the current frame." @@ -113,9 +115,11 @@ _bi_: Auto Insert ^^ ^^ (if (daemonp) (progn (add-hook 'after-make-frame-functions #'oni-gui-setup-fontsets) - (add-hook 'after-make-frame-functions #'oni-gui-setup-ligatures)) + (add-hook 'after-make-frame-functions #'oni-gui-setup-ligatures) + (add-hook 'after-make-frame-functions #'oni-gui-setup-faces)) (oni-gui-setup-fontsets nil) - (oni-gui-setup-ligatures)) + (oni-gui-setup-ligatures) + (oni-gui-setup-faces nil)) (global-unset-key (kbd "C-z")) (global-set-key (kbd "C-c c") 'oni-gui-hydra/body) -- cgit v1.2.3-54-g00ecf