From 058730577029e1d78b8ffab43359ce6fe89c74ac Mon Sep 17 00:00:00 2001 From: noa Date: Mon, 11 Nov 2024 11:58:02 +0800 Subject: Wrap font changes in display-graphic-p for compatibility with emacs-nox --- emacs/init.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'emacs/init.el') 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 -- cgit 1.4.1-2-gfad0