summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 539c89a..eaaa328 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -917,6 +917,17 @@ The misspelled word is taken from OVERLAY.  WORD is the corrected word."
 ;; For some frustrating reason, emacs does not respect fontconfig font settings.  What this means in practice is that emacs by default draws cjk characters with the korean variant.  Luckily emacs has its own obscure and poorly documented way of doing things, so i can iterate over the relevant charsets and set the font specifically for those characters.
 (dolist (charset '(han cjk-misc))
   (set-fontset-font t charset (font-spec :family "Noto Sans CJK SC")))
+;; Similar to the above, we have to manually set the font we want to be used for emoji.  I like the cute style of the emoji in fsd emoji, but it doesn't have very good coverage, so we also set noto emoji as the backup.  Note that noto emoji is not the same as noto color emoji, which uses coloured emoji.  That's clearly against the vibe of this emacs!
+(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 cape :ensure t)
+(add-to-list 'vertico-multiform-categories
+             '(cape-emoji grid indexed (vertico-grid-annotate . 6)))
+(global-set-key (kbd "C-.") #'cape-emoji)
 
 ;; Describe a key based on a string like "C-SPC"
 (defun describe-key-shortcut (shortcut)