From da7d2889dc8c206e4d9cb12f94f479eacc910577 Mon Sep 17 00:00:00 2001 From: Adam Hellberg Date: Sun, 23 Oct 2022 03:09:00 +0200 Subject: [PATCH] Fix fixed-pitch font not adjusting size Setting the `doom-font` variable in doom emacs will configure both the `default` and `fixed-pitch` "faces" in emacs with a size, but the font size scaler in emacs only affects the `default` face, leaving `fixed-pitch` unchanged. If `fixed-pitch` is instead set to be a fraction it will always be sized relative to the `default` face, and as such it will be scaled appropriately. --- doom/.config/doom/config.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doom/.config/doom/config.el b/doom/.config/doom/config.el index acb6d4a..577ee11 100644 --- a/doom/.config/doom/config.el +++ b/doom/.config/doom/config.el @@ -26,6 +26,12 @@ (setq my/font-mode 'caskaydia) +(defun my/adjust-fixed-pitch () + (set-face-attribute 'fixed-pitch nil :height 1.0)) + +(add-hook! '(after-setting-font-hook doom-init-ui-hook after-init-hook server-after-make-frame-hook) + #'my/adjust-fixed-pitch) + (defun my/cascadia-fonts () (setq doom-font (font-spec :family "Cascadia Code" :size 16 :weight 'regular) -- 2.54.0