commit f595faa125da1a1c465d659c6e548bd90e785cf2 parent 07dc62025e29d8d7ceb8d2fcb43176a976202478 Author: Vincent Demeester <vincent@sbr.pm> Date: Fri, 17 Apr 2020 19:44:23 +0200 config-appearance.el: do not re-load fonts They are loaded at init so no need to re-load them unless `mu-reset-fonts` is called Signed-off-by: Vincent Demeester <vincent@sbr.pm> Diffstat:
M | tools/emacs/config/config-appearance.el | | | 25 | ++----------------------- |
1 file changed, 2 insertions(+), 23 deletions(-)
diff --git a/tools/emacs/config/config-appearance.el b/tools/emacs/config/config-appearance.el @@ -4,32 +4,11 @@ ;;; Code: ;; TypeFaceConfiguration (use-package emacs + :defer 3 :bind ("C-c f r" . mu-reset-fonts) :commands (mu-reset-fonts) + :hook (after-init . mu-reset-fonts) :config -;;; ¯\_(ツ)_/¯ - (defconst font-height 130 - "Default font-height to use.") - ;; Middle/Near East: שלום, السّلام عليكم - (when (member "Noto Sans Arabic" (font-family-list)) - (set-fontset-font t 'arabic "Noto Sans Arabic")) - (when (member "Noto Sans Hebrew" (font-family-list)) - (set-fontset-font t 'arabic "Noto Sans Hebrew")) - ;; Africa: ሠላም - (when (member "Noto Sans Ethiopic" (font-family-list)) - (set-fontset-font t 'ethiopic "Noto Sans Ethiopic")) - - ;; Default font is Ubuntu Mono (and Ubuntu Sans for variable-pitch) - ;; If Ubuntu Mono or Ubuntu Sans are not available, use the default Emacs face - (when (member "Ubuntu Mono" (font-family-list)) - (set-face-attribute 'default nil - :family "Ubuntu Mono" - :height font-height)) - (when (member "Ubuntu Sans" (font-family-list)) - (set-face-attribute 'variable-pitch nil - :family "Ubuntu Sans" - :height font-height - :weight 'regular)) (defun mu-reset-fonts () "Reset fonts to my preferences."