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
This commit is contained in:
Liam Hupfer 2023-09-27 20:14:39 -05:00 committed by Henrik Lissner
parent 37affa5cff
commit 7abed4dbf1

View file

@ -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")))