summary refs log tree commit diff
diff options
context:
space:
mode:
authornoa2024-11-11 11:58:02 +0800
committernoa2024-11-11 11:58:02 +0800
commit058730577029e1d78b8ffab43359ce6fe89c74ac (patch)
tree69d45e72db846cc0357a0b24858e9ebf68e27d68
parentd8cfd5dcc06d70238b0626b6a0cdb036ee2854f9 (diff)
Wrap font changes in display-graphic-p for compatibility with emacs-nox
-rw-r--r--emacs/init.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 29d0454..dced0e3 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -64,12 +64,14 @@
  '(fixed-pitch ((t (:family "Noto Sans Mono" :height 120)))))
 
 ;; Use simplified not korean hanzi
-(dolist (charset '(han cjk-misc))
-  (set-fontset-font t charset (font-spec :family "Noto Sans CJK SC")))
+(when (display-graphic-p)
+  (dolist (charset '(han cjk-misc))
+    (set-fontset-font t charset (font-spec :family "Noto Serif CJK SC"))))
 
 ;; Prioritise fsd and noto emoji over coloured variants
-(set-fontset-font t 'emoji (font-spec :family "FSD Emoji") nil 'prepend)
-(set-fontset-font t 'emoji (font-spec :family "Noto Emoji") nil 'append)
+(when (display-graphic-p)
+  (set-fontset-font t 'emoji (font-spec :family "FSD Emoji") nil 'prepend)
+  (set-fontset-font t 'emoji (font-spec :family "Noto Emoji") nil 'append))
 
 ;; While we're here, let's set up emoji input.
 (use-package emoji