From 7abed4dbf1619ff581bf24dc72822c625b9983fc Mon Sep 17 00:00:00 2001 From: Liam Hupfer Date: Wed, 27 Sep 2023 20:14:39 -0500 Subject: [PATCH] fix: fall back to emoji font for symbols Symbols fonts vary widely in their coverage of Unicode symbols blocks. Emoji fonts are generally guaranteed to cover the small subset of symbols code points that have assigned emoji representations, so fall back to them when symbols fonts are lacking. Ref: https://en.wikipedia.org/w/index.php?title=Variant_form_(Unicode)&oldid=1175107681#Blocks_with_standardized_variation_sequences --- lisp/doom-ui.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/doom-ui.el b/lisp/doom-ui.el index b3867e851..8e35f34b7 100644 --- a/lisp/doom-ui.el +++ b/lisp/doom-ui.el @@ -542,7 +542,10 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (dolist (script '(symbol mathematical)) (set-fontset-font t script symbol-font))) (when emoji-font - (set-fontset-font t 'emoji emoji-font))) + (set-fontset-font t 'emoji emoji-font) + ;; some characters in the Emacs symbol script are often covered by emoji + ;; fonts + (set-fontset-font t 'symbol emoji-font nil 'append))) ;; Nerd Fonts use these Private Use Areas (dolist (range '((#xe000 . #xf8ff) (#xf0000 . #xfffff))) (set-fontset-font t range "Symbols Nerd Font Mono")))