Open Mihara opened 2 years ago
Seems like a cool idea. It would probably simplify code-points and make it easier to customize but this only really works with somthing like nerd-fonts (if I'm understanding it correctly). There's still some font glyphs that aren't in nerd fonts (like emacs for one :cry:) so we still need something like all-the-icons that can work across multiple (perhaps conflicting) fontsets. Once this does happen though I see no issue with your suggestion, you might wanna raise it on all-the-icons as well when that happens.
Technically, you could just use all the fonts all-the-icons
installs and stitch them all together this way into the base font, as well. I am just not up to tracking down all the codepoints involved, right now, as even fishing them out of a single ttf file was a task that is slightly above my current understanding of fonts.
With Emacs in particular (and with kitty where I picked up the technique) you don't have to use the patched nerd fonts: you can override part of the fontset with another font that only contains the icon glyphs.
This way, you could potentially avoid installing the fonts from
all-the-icons
altogether and avoid using patched fonts. This appears to work well withall-the-icons-nerd-fonts
as it is now.This is how I do it:
set-fontset-font
:;; This is the list according to Kitty-term documentation. ;; ((#X23fb . #X23fe) #X2b58 (#Xe200 . #Xe2a9) (#Xe0a0 . #Xe0a3) ;; (#Xe0b0 . #Xe0bf) (#Xe0c0 . #Xe0c8) (#Xe0cc . #Xe0cf) ;; (#Xe0d0 . #Xe0d2) #Xe0d4 (#Xe700 . #Xe7c5) (#Xf000 . #Xf2e0) ;; #X2665 #X26a1 (#Xf400 . #Xf4a8) #Xf67c ;; (#Xe000 . #Xe00a) (#Xf300 . #Xf313) (#Xe5fa . #Xe62b))
(mihara/attach-nerd-font) (add-hook 'after-make-frame-functions 'mihara/attach-nerd-font)