refactor!: replace all-the-icons with nerd-icons

BREAKING CHANGE: This commit replaces all-the-icons with nerd-fonts. Any
all-the-icons-* function calls or variable references in your private
config will break and should be replaced with their nerd-icons-*
equivalent. That said, Doom will continue to install all-the-icons for
a while, so feel free to load it if you don't want to fully commit to
the change yet.

This change is happening because nerd-icon has wider support for GUI and
TUI Emacs; has a larger, more consistent selection of symbols; plus unicode
coverage.

Fix: #7368
Close: #6675
Close: #7364
This commit is contained in:
Ellis Kenyő 2023-09-14 00:03:55 +01:00 committed by GitHub
parent 7bdf7cf7c0
commit 9787022b83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 293 additions and 407 deletions

View file

@ -73,11 +73,11 @@ I rarely need to know what minor modes are active, so I removed them. ~M-x
doom/describe-active-minor-mode~ was written to substitute for it.
** Icons in my modeline look strange
1. Check whether ~all-the-icons~ are installed. Run ~M-x
all-the-icons-install-fonts~ to install the resource fonts. Note that
~all-the-icons~ only support GUI. See [[https://github.com/domtronn/all-the-icons.el][all-the-icons]] for details.
1. Check whether ~nerd-icons~ are installed. Run ~M-x
nerd-icons-install-fonts~ to install the resource fonts. Note that
~nerd-icons~ only support GUI. See [[https://github.com/domtronn/nerd-icons.el][nerd-icons]] for details.
2. ~cnfonts~ will conflict with ~all-the-icons~. You can refer the following
2. ~cnfonts~ will conflict with ~nerd-icons~. You can refer the following
workaround:
#+begin_src emacs-lisp
;; See https://github.com/seagle0128/doom-modeline/issues/278#issuecomment-569510336
@ -87,18 +87,11 @@ doom/describe-active-minor-mode~ was written to substitute for it.
(add-hook 'after-setting-font-hook #'cnfonts-set-font)
#+end_src
3. If ~all-the-icons~ fonts are installed while the icons cannot display
correctly, please install the non-free font [[https://dn-works.com/wp-content/uploads/2020/UFAS-Fonts/Symbola.zip][Symbola]]. This issue usually
occurs on Windows.
** The right side of the modeline is cut off
I believe the consensus is: this is due to oversized icons, i.e. a font issue.
Some possible solutions:
1. Tweak ~all-the-icons-scale-factor~ (1.2 by default): ~(setq
all-the-icons-scale-factor 1.1)~
2. Add some padding to the modeline definition:
1. Add some padding to the modeline definition:
#+begin_src emacs-lisp
(after! doom-modeline
(doom-modeline-def-modeline 'main
@ -106,7 +99,7 @@ Some possible solutions:
'(misc-info minor-modes checker input-method buffer-encoding major-mode process vcs " "))) ; <-- added padding here
#+end_src
3. Use another font for the mode line (or a different ~:height~) (source)
2. Use another font for the mode line (or a different ~:height~) (source)
#+begin_src emacs-lisp
(custom-set-faces!
'(mode-line :family "Noto Sans" :height 0.9)