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

Rebuild MesloLGS NF with newer icons #2217

Closed
romkatv opened this issue Mar 9, 2023 · 7 comments
Closed

Rebuild MesloLGS NF with newer icons #2217

romkatv opened this issue Mar 9, 2023 · 7 comments

Comments

@romkatv
Copy link
Owner

romkatv commented Mar 9, 2023

New icons have been added to Nerd Fonts since the last time MesloLGS NF has been built. MesloLGS NF needs to be rebuilt to include them.

See #2033, #2167, #2184, #2216.

@romkatv
Copy link
Owner Author

romkatv commented Apr 2, 2023

My plan is as follows.

  1. Add POWERLEVEL9K_MODE=nerdfont-v3. Under this mode Material icons will come from F0001-F19C3 rather than from F500-FD46.
  2. Add an extra question to the wizard that checks whether F0001-F19C3 contains material icons. More specifically, replace the Debian Logo question (a part of Font Logos (Font Linux), mapped at F300-F31C in Nerd Fonts) with another question that utilizes a Material icon. A good candidate is Arrow Right Bold: U+FC32 nf-mdi-arrow_right_bold in the old range, and U+F0734 nf-md-arrow_right_bold in the new range. Ask about the latter first. If the user replies in the negative, ask about the former.
  3. Optional. Rebuild MesloLGS NF based on v2.3.3 of Nerd Fonts. Set Font Version to "1.210;Nerd Fonts 2.3.3".
  4. Wait for Nerd Fonts to release v3 and then Rebuild MesloLGS NF based on it.

An alternative to 3 & 4 is to rebuild MesloLGS NF based on v2.3.3 of Nerd Fonts without overriding the source font at F500-FD46. In other words, do now what Nerd Fonts promises to do with v3.

I'm working on steps 1-2. I haven't yet decided how to proceed after that.

@romkatv
Copy link
Owner Author

romkatv commented Apr 2, 2023

The following command can be used to find all icons between U+F500 and U+FD46 used by powerlevel10k:

% git ls-files | xargs -- grep -iE '\\u(0*)f[5-9a-f][0-9a-f]{2}[^0-9a-f]'
internal/icons.zsh:        NETWORK_ICON                   '\uF50D'$s             # 
internal/icons.zsh:        AZURE_ICON                     '\uFD03'               # ﴃ
internal/icons.zsh:        GCLOUD_ICON                    '\uF7B7'               # 
internal/icons.zsh:        PACKAGE_ICON                   '\uF8D6'               # 
internal/wizard.zsh:      sub BATTERY_STAGES "'\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578'"

romkatv added a commit that referenced this issue Apr 2, 2023
romkatv added a commit that referenced this issue Apr 2, 2023
@romkatv
Copy link
Owner Author

romkatv commented Apr 2, 2023

Steps 1 & 2 are done in https:/romkatv/powerlevel10k/tree/nerdfonts-v3. I don't want to merge this branch as-is because it'll imply that users of MesloLGS NF will have to answer "No" to one of the font capability questions, which is bound to cause confusion and complaints. I'm now working on Step 3. If I succeed, I'll merge branch nerdfonts-v3 into master.

@romkatv
Copy link
Owner Author

romkatv commented Apr 3, 2023

Step 3 is done.

If you are already using MesloLGS NF, consider updating your font. The robust way to do it:

  1. Uninstall MesloLGS NF.
  2. Reboot.
  3. Download these four ttf files:
  4. Double-click on each file and click "Install".

@romkatv romkatv closed this as completed Apr 3, 2023
@romkatv
Copy link
Owner Author

romkatv commented Apr 3, 2023

I've modified the wizard to prefer the legacy Material icons over the new ones because the new icons trigger a bug in Windows Terminal. I've reported it here: microsoft/terminal#15086

@PrayagS
Copy link

PrayagS commented Apr 5, 2023

@romkatv Seems like there's a typo in the Kubernetes icon.

KUBERNETES_ICON '\F10FE' # 󱃾

echo -e '\F10FE'
\F10FE
❯ echo -e '\UF10FE'
󱃾

Let me know if this is a valid observation, I'll send a PR to update the icon unicode.

romkatv added a commit that referenced this issue Apr 5, 2023
@romkatv
Copy link
Owner Author

romkatv commented Apr 5, 2023

Thanks! Fixed.

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