summary refs log tree commit diff
path: root/emacs/custom
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-03-03 19:38:04 -0800
committerFranck Cuny <franck@fcuny.net>2022-03-03 19:38:04 -0800
commita9ada8bd3edf529d43108dbe9d3573f3b9f70fde (patch)
tree0070fc1d6620ab10e6c5305670d8f5ac2ce18a90 /emacs/custom
parentthemes: add modus again (diff)
downloademacs.d-a9ada8bd3edf529d43108dbe9d3573f3b9f70fde.tar.gz
emacs: configure the font correctly
Diffstat (limited to 'emacs/custom')
-rw-r--r--emacs/custom/fcuny-ui.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/emacs/custom/fcuny-ui.el b/emacs/custom/fcuny-ui.el
index 8576fb4..dced5cd 100644
--- a/emacs/custom/fcuny-ui.el
+++ b/emacs/custom/fcuny-ui.el
@@ -27,7 +27,7 @@
   (blink-cursor-mode -1)
   (setq frame-title-format '("%b@" (:eval (or (file-remote-p default-directory 'host) system-name))))
   (when (memq window-system '(mac ns))
-    (set-frame-font "Source Code Pro-15")
+    (add-to-list 'default-frame-alist '(font . "Source Code Pro-15"))
     (add-to-list 'default-frame-alist '(fullscreen . maximized))
     (add-to-list 'default-frame-alist '(ns-appearance . nil))
     (add-to-list 'default-frame-alist '(ns-transparent-titlebar . nil))
@@ -36,7 +36,10 @@
     (when (boundp 'mac-allow-anti-aliasing)
       (setq mac-allow-anti-aliasing t)))
   (when (memq window-system '(x pgtk))
-    (set-frame-font "Source Code Pro-12")
+    ;; if using `set-frame-font`, when opening a new frame with
+    ;; emacsclient, the font will not be used. Instead, use
+    ;; `default-frame-alist` to have the same font with emacsclient.
+    (add-to-list 'default-frame-alist '(font . "Source Code Pro-11"))
     ;; this is a fall back in the case we have Unicode characters.
     ;; For example, with this settings, the following source is
     ;; rendered correctly 😇 😀 and 🤢