From 1a78f6cd2f7ea39ea34280adfa6cc60ac48b8b7c Mon Sep 17 00:00:00 2001 From: noa Date: Sat, 8 Feb 2025 23:27:26 +0800 Subject: Only set emoji fonts in graphical emacs --- emacs/init.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'emacs/init.el') 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. -- cgit 1.4.1-2-gfad0