From 6cad215a6577df3b0bb8014bf575dd86d748d72a Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Sat, 19 Aug 2017 03:03:34 +0100 Subject: [PATCH] Set font immediately at startup --- init.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/init.el b/init.el index d38b977..794bb64 100644 --- a/init.el +++ b/init.el @@ -19,10 +19,14 @@ ;; Font --------------------------------------------------------------------- - (setq default-frame-alist '((font . "Source Code Pro-10"))) - ;; Emacs does not set italic face automatically - (set-face-attribute 'italic nil - :family "Source Code Pro-Italic") + (let* ((font-name "Source Code Pro") + (font-size 10) + (font-spec (concat font-name "-" (int-to-string font-size)))) + + (set-frame-font font-spec nil t) + (add-to-list 'default-frame-alist `(font . ,font-spec)) + (set-face-attribute 'italic nil ;; Emacs does not set italic face + :family (concat font-name "-Italic"))) ;; Fullscreen ---------------------------------------------------------------