Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for Nerd Fonts 3.0 #2245

Closed
nix6839 opened this issue Mar 30, 2023 · 1 comment
Closed

Prepare for Nerd Fonts 3.0 #2245

nix6839 opened this issue Mar 30, 2023 · 1 comment

Comments

@nix6839
Copy link

nix6839 commented Mar 30, 2023

See: https://github.com/ryanoasis/nerd-fonts/releases/tag/v2.3.3

Material Design Icons
The Material Design Icons have to move codepoints. Historically we patch them in between F500 - FD46; but part of that range is needed for Chinese and other glyphs. With ryanoasis/nerd-fonts#773 and Plan 5+ of ryanoasis/nerd-fonts#365 their new home will be after F0001. And they grow considerably.

The v2.3.x release has both, the 'old' and the 'new' codepoints to enable you an easier transision. Please change already now your prompts and other uses to the new codepoints. Release v3.0.0 will finally drop the old codepoints (F500 - FD46).

The following is a patch for the replaced icons used in powerlevel10k.

diff --git a/internal/icons.zsh b/internal/icons.zsh
index 95620b7..c10b3df 100644
--- a/internal/icons.zsh
+++ b/internal/icons.zsh
@@ -486,7 +486,7 @@ function _p9k_init_icons() {
         HOME_SUB_ICON                  '\uF07C'$s             # 
         FOLDER_ICON                    '\uF115'$s             # 
         ETC_ICON                       '\uF013'$s             # 
-        NETWORK_ICON                   '\uF50D'$s             # 
+        NETWORK_ICON                   '\uF0378'$s            # 󰍸
         LOAD_ICON                      '\uF080 '              # 
         SWAP_ICON                      '\uF464'$s             # 
         RAM_ICON                       '\uF0E4'$s             # 
@@ -533,10 +533,10 @@ function _p9k_init_icons() {
         PROXY_ICON                     '\u2194'               # ↔
         DOTNET_ICON                    '\uE77F'               # 
         DOTNET_CORE_ICON               '\uE77F'               # 
-        AZURE_ICON                     '\uFD03'               # ﴃ
+        AZURE_ICON                     '\uF0805'              # 󰠅
         DIRENV_ICON                    '\u25BC'               # ▼
         FLUTTER_ICON                   'F'
-        GCLOUD_ICON                    '\uF7B7'               # 
+        GCLOUD_ICON                    '\uF11F6'              # 󱇶
         LUA_ICON                       '\uE620'               # 
         PERL_ICON                      '\uE769'               # 
         NNN_ICON                       'nnn'
@@ -551,7 +551,7 @@ function _p9k_init_icons() {
         POSTGRES_ICON                  '\uE76E'               # 
         PHP_ICON                       '\uE608'               # 
         HASKELL_ICON                   '\uE61F'               # 
-        PACKAGE_ICON                   '\uF8D6'               # 
+        PACKAGE_ICON                   '\uF03D7'              # 󰏗
         JULIA_ICON                     '\uE624'               # 
         SCALA_ICON                     '\uE737'               # 
         TOOLBOX_ICON                   '\uE20F'$s             # 
diff --git a/internal/wizard.zsh b/internal/wizard.zsh
index f93fd0a..1643f80 100644
--- a/internal/wizard.zsh
+++ b/internal/wizard.zsh
@@ -1721,7 +1721,7 @@ function generate_config() {
     fi
 
     if [[ $POWERLEVEL9K_MODE == nerdfont-complete ]]; then
-      sub BATTERY_STAGES "'\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578'"
+      sub BATTERY_STAGES "'\uf008e\uf007a\uf007b\uf007c\uf007d\uf007e\uf007f\uf0080\uf0081\uf0082\uf0079'"
     fi
 
     if [[ $style == (classic|rainbow) ]]; then

The reason I didn't PR this is because the maintainer thinks we should consider users who use fonts that don't include the new code points. See: #2033 (comment)

Nerd Fonts 3.0 is released and the #2217 is resolved, it's a good idea to give up backwards compatibility.

@romkatv
Copy link
Owner

romkatv commented Apr 2, 2023

Font upgrade is tracked in #2217.

@romkatv romkatv closed this as completed Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants