Commit f595faa125da

Vincent Demeester <vincent@sbr.pm>
2020-04-17 19:44:23
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>
1 parent 07dc620
Changed files (1)
tools
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."