summary refs log tree commit diff
path: root/emacs/init.el
diff options
context:
space:
mode:
authornoa2025-02-08 23:27:26 +0800
committernoa2025-02-08 23:27:26 +0800
commit1a78f6cd2f7ea39ea34280adfa6cc60ac48b8b7c (patch)
treefa2fe62cbd36e02da653536d78bd4e3848d4f0b7 /emacs/init.el
parent30d4dc370c5e1a3b630e85df6b65149de1c79ecc (diff)
Only set emoji fonts in graphical emacs
Diffstat (limited to 'emacs/init.el')
-rw-r--r--emacs/init.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/emacs/init.el b/emacs/init.el
index e740979..00cfd58 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -56,8 +56,11 @@
     (set-fontset-font t charset (font-spec :family "Noto Serif CJK SC"))))
 
 ;; Prioritise fsd and noto emoji over coloured variants
-(when (display-graphic-p)
-  (set-fontset-font t 'emoji (font-spec :family "FSD Emoji") nil 'prepend)
+(when (and (display-graphic-p)
+           (member "FSD Emoji" (font-family-list)))
+  (set-fontset-font t 'emoji (font-spec :family "FSD Emoji") nil 'prepend))
+(when (and (display-graphic-p)
+           (member "Noto Emoji" (font-family-list)))
   (set-fontset-font t 'emoji (font-spec :family "Noto Emoji") nil 'append))
 
 ;; While we're here, let's set up emoji input.