about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-04-30 12:50:33 -0500
committerCase Duckworth2021-04-30 12:50:33 -0500
commitb723eb988f27f0420ee6c28b72a5e7c28f68956d (patch)
treed948c47a29854943e1666ba57ab6868e343bf1a3
parentAdd the text scale to the modeline (diff)
downloademacs-b723eb988f27f0420ee6c28b72a5e7c28f68956d.tar.gz
emacs-b723eb988f27f0420ee6c28b72a5e7c28f68956d.zip
Move emoji font configuration to the initial frame setup function
-rw-r--r--early-init.el4
-rw-r--r--init.el11
-rw-r--r--lisp/acdw-fonts.el14
3 files changed, 19 insertions, 10 deletions
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 @@
86 (:other "sans-serif")) 86 (:other "sans-serif"))
87 acdw-fonts/variable-size 11) 87 acdw-fonts/variable-size 11)
88 (acdw-fonts/set) 88 (acdw-fonts/set)
89 (acdw-fonts/setup-emoji-fonts "Segoe UI Emoji"
90 "Noto Color Emoji"
91 "Apple Color Emoji"
92 "Symbola")
89 (remove-function after-focus-change-function 93 (remove-function after-focus-change-function
90 'hook--setup-fonts))) 94 'hook--setup-fonts)))
91 95
diff --git a/init.el b/init.el index 307b753..38adf44 100644 --- a/init.el +++ b/init.el
@@ -263,16 +263,7 @@
263 (:work (set-clipboard-coding-system 'utf-16-le) 263 (:work (set-clipboard-coding-system 'utf-16-le)
264 (set-selection-coding-system 'utf-16-le)) 264 (set-selection-coding-system 'utf-16-le))
265 (_ (set-selection-coding-system 'utf-8) 265 (_ (set-selection-coding-system 'utf-8)
266 (set-clipboard-coding-system 'utf-8))) 266 (set-clipboard-coding-system 'utf-8))))
267
268 (let ((ffl (font-family-list)))
269 (dolist (emoji-font '("Segoe UI Emoji"
270 "Noto Color Emoji"
271 "Apple Color Emoji"
272 "Symbola"))
273 (when (member emoji-font ffl)
274 (set-fontset-font t 'symbol
275 (font-spec :family emoji-font) nil 'append)))))
276 267
277(setup eshell 268(setup eshell
278 (:option eshell-directory-name (acdw/dir "eshell/" t) 269 (: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
113 113
114(add-hook 'buffer-face-mode-hook #'acdw-fonts/buffer-face-hook) 114(add-hook 'buffer-face-mode-hook #'acdw-fonts/buffer-face-hook)
115 115
116
117;;; Emoji fonts
118;; from https://old.reddit.com/r/emacs/comments/mvlid5/
119
120(defun acdw-fonts/setup-emoji-fonts (&rest emoji-fonts)
121 "For all EMOJI-FONTS that exist, add them to the symbol fontset.
122
123This is for emoji fonts."
124 (let ((ffl (font-family-list)))
125 (dolist (font emoji-fonts)
126 (when (member font ffl)
127 (set-fontset-font t 'symbol
128 (font-spec :family font) nil 'append)))))
129
116(provide 'acdw-fonts) 130(provide 'acdw-fonts)
117;;; acdw-fonts.el ends here 131;;; acdw-fonts.el ends here