diff options
author | noa | 2024-11-11 11:58:02 +0800 |
---|---|---|
committer | noa | 2024-11-11 11:58:02 +0800 |
commit | 058730577029e1d78b8ffab43359ce6fe89c74ac (patch) | |
tree | 69d45e72db846cc0357a0b24858e9ebf68e27d68 | |
parent | d8cfd5dcc06d70238b0626b6a0cdb036ee2854f9 (diff) |
Wrap font changes in display-graphic-p for compatibility with emacs-nox
-rw-r--r-- | emacs/init.el | 10 |
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 |