diff --git a/early-init.el b/early-init.el index 237cffe..e9d7de0 100644 --- a/early-init.el +++ b/early-init.el @@ -86,6 +86,10 @@ (:other "sans-serif")) acdw-fonts/variable-size 11) (acdw-fonts/set) + (acdw-fonts/setup-emoji-fonts "Segoe UI Emoji" + "Noto Color Emoji" + "Apple Color Emoji" + "Symbola") (remove-function after-focus-change-function 'hook--setup-fonts))) diff --git a/init.el b/init.el index 307b753..38adf44 100644 --- a/init.el +++ b/init.el @@ -263,16 +263,7 @@ (:work (set-clipboard-coding-system 'utf-16-le) (set-selection-coding-system 'utf-16-le)) (_ (set-selection-coding-system 'utf-8) - (set-clipboard-coding-system 'utf-8))) - - (let ((ffl (font-family-list))) - (dolist (emoji-font '("Segoe UI Emoji" - "Noto Color Emoji" - "Apple Color Emoji" - "Symbola")) - (when (member emoji-font ffl) - (set-fontset-font t 'symbol - (font-spec :family emoji-font) nil 'append))))) + (set-clipboard-coding-system 'utf-8)))) (setup eshell (:option eshell-directory-name (acdw/dir "eshell/" t) diff --git a/lisp/acdw-fonts.el b/lisp/acdw-fonts.el index c4f16e8..6c0cb8d 100644 --- a/lisp/acdw-fonts.el +++ b/lisp/acdw-fonts.el @@ -113,5 +113,19 @@ your variable size is 14, the computed relative size will be (add-hook 'buffer-face-mode-hook #'acdw-fonts/buffer-face-hook) + +;;; Emoji fonts +;; from https://old.reddit.com/r/emacs/comments/mvlid5/ + +(defun acdw-fonts/setup-emoji-fonts (&rest emoji-fonts) + "For all EMOJI-FONTS that exist, add them to the symbol fontset. + +This is for emoji fonts." + (let ((ffl (font-family-list))) + (dolist (font emoji-fonts) + (when (member font ffl) + (set-fontset-font t 'symbol + (font-spec :family font) nil 'append))))) + (provide 'acdw-fonts) ;;; acdw-fonts.el ends here