summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs/functions.el7
-rw-r--r--emacs/init.el9
2 files changed, 16 insertions, 0 deletions
diff --git a/emacs/functions.el b/emacs/functions.el
index accb52b..9eb405b 100644
--- a/emacs/functions.el
+++ b/emacs/functions.el
@@ -43,6 +43,13 @@ enabled."
(enable-theme light-theme)
(disable-theme dark-theme)))))
+(defun my/set-frame-font ()
+ "Set font in the selected frame."
+ (let* ((pred (lambda (font) (x-family-fonts (plist-get font :family))))
+ (font (seq-find pred my/fonts)))
+ (when font
+ (apply #'set-face-attribute `(default nil ,@font)))))
+
;; “Window Management” Functions
diff --git a/emacs/init.el b/emacs/init.el
index e246e6d..637e775 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -107,6 +107,15 @@
(defvar my/night-theme nil "Theme to use during the night.")
+(defvar my/fonts
+ '((:family "Iosevka Fixed Slab" :height 140)
+ (:family "Iosevka SS04" :height 140)
+ (:family "Iosevka" :height 140)
+ (:family "Menlo" :height 120))
+ "Fonts to try as default.")
+
+(add-hook 'after-init-hook #'my/set-frame-font)
+
;; “Window” Management