mohkale / all-the-icons-nerd-fonts Goto Github PK
View Code? Open in Web Editor NEWNerd font integration for all-the-icons
License: GNU General Public License v3.0
Nerd font integration for all-the-icons
License: GNU General Public License v3.0
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 with all-the-icons-nerd-fonts
as it is now.
This is how I do it:
set-fontset-font
:(defun mihara/attach-nerd-font (&rest maybe-a-frame)
"Attach the Symbols Nerd Font with `set-fontset-font'.
Parameter MAYBE-A-FRAME is actually ignored."
;; It's only needed so that this function runs in newly created frames,
;; which is needed with a daemon Emacs process starting a new frame
;; when no others are open.
(interactive) ;; To make it easier to fix manually in case of issues.
(dolist (target
'((#X23fb . #X23fe)
#X2665
#X26a1
#X2b58
(#Xe000 . #Xe00a)
(#Xe0a0 . #Xe0a3)
(#Xe0b0 . #Xe0c8)
#Xe0ca
(#Xe0cc . #Xe0d2)
#Xe0d4
(#Xe200 . #Xe2a9)
(#Xe300 . #Xe3e3)
(#Xe5fa . #Xe62f)
(#Xe700 . #Xe7c5)
(#Xf000 . #Xf00e)
(#Xf010 . #Xf01e)
(#Xf021 . #Xf03e)
(#Xf040 . #Xf04e)
(#Xf050 . #Xf05e)
(#Xf060 . #Xf06e)
(#Xf070 . #Xf07e)
(#Xf080 . #Xf08e)
(#Xf090 . #Xf09e)
(#Xf0a0 . #Xf0ae)
(#Xf0b0 . #Xf0b2)
(#Xf0c0 . #Xf0ce)
(#Xf0d0 . #Xf0de)
(#Xf0e0 . #Xf0ee)
(#Xf0f0 . #Xf0fe)
(#Xf100 . #Xf10e)
(#Xf110 . #Xf11e)
(#Xf120 . #Xf12e)
(#Xf130 . #Xf13e)
(#Xf140 . #Xf14e)
(#Xf150 . #Xf15e)
(#Xf160 . #Xf16e)
(#Xf170 . #Xf17e)
(#Xf180 . #Xf18e)
(#Xf190 . #Xf19e)
(#Xf1a0 . #Xf1ae)
(#Xf1b0 . #Xf1be)
(#Xf1c0 . #Xf1ce)
(#Xf1d0 . #Xf1de)
(#Xf1e0 . #Xf1ee)
(#Xf1f0 . #Xf1fe)
(#Xf200 . #Xf20e)
(#Xf210 . #Xf21e)
(#Xf221 . #Xf23e)
(#Xf240 . #Xf24e)
(#Xf250 . #Xf25e)
(#Xf260 . #Xf26e)
(#Xf270 . #Xf27e)
(#Xf280 . #Xf28e)
(#Xf290 . #Xf29e)
(#Xf2a0 . #Xf2ae)
(#Xf2b0 . #Xf2be)
(#Xf2c0 . #Xf2ce)
(#Xf2d0 . #Xf2de)
#Xf2e0
(#Xf300 . #Xf31c)
(#Xf400 . #Xf4a9)))
(set-fontset-font nil target "Symbols Nerd 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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.