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

Some glyphs missing after v3.x.x update #1190

Closed
3 tasks done
luizkowalski opened this issue May 1, 2023 · 54 comments
Closed
3 tasks done

Some glyphs missing after v3.x.x update #1190

luizkowalski opened this issue May 1, 2023 · 54 comments
Labels
confirmed not-a-bug not only wontfix but this is actually wanted

Comments

@luizkowalski
Copy link

luizkowalski commented May 1, 2023

🗹 Requirements

  • I have searched the issues for my issue and found nothing related and/or helpful
  • I have searched the FAQ for help
  • I have searched the Wiki for help

🎯 Subject of the issue

Experienced behavior:
this morning I updated some deps on my computers and some fonts were updated as well but this is not a big deal since this has happened before, but after the update finished I noticed some icons on my neovim were wrong like the Gemfile icon and the X for closing a buffer:

image

This was weird so I decided to delete all custom fonts I had, clean up the cache, re-download them manually, and reinstall it. To my surprise, nothing has changed

No idea what is going on, this is my text configuration on iTerm2:

image

Neovim version:

:version
NVIM v0.9.0
Build type: Release
LuaJIT 2.1.0-beta3

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.0/share/nvim"

No Neovim config has been changed prior to today or after this.

Expected behavior:
X and missing icons should exist

Example symbols:

🔧 Your Setup

  • Which font are you using (e.g. Anonymice Powerline Nerd Font Complete.ttf)?
    • Fira Code Nerd Font and Fira Code Nerd Font Mono
  • Where did you get the file from (download link, self patched, source downloaded from link...)
    • Homebrew and manually download
  • Which terminal emulator are you using (e.g. iterm2, urxvt, gnome, konsole)?
    • iterm2
  • Are you using OS X, Linux or Windows? And which specific version or distribution?
    • MacOS

One more screenshot from other missing icons

image

I guess it should've been the "unknown file" icon

@Finii
Copy link
Collaborator

Finii commented May 1, 2023

Can you try to copy and paste the missing-icon-characters into a comment as text here? I can determine the codepoints then.

@dbuch
Copy link

dbuch commented May 1, 2023

Right, I can confirm this problem.

Which font are you using (e.g. Anonymice Powerline Nerd Font Complete.ttf)?

Fira Code Nerd Font and Fira Code Nerd Font Mono

Same here.

Are you using OS X, Linux or Windows? And which specific version or distribution?

Linux (Arch linux)

@Finii
Copy link
Collaborator

Finii commented May 1, 2023

I fear the missing icon are from the dropped Material Design Icons set. But we need the codepoints or the characters copy as text an pasted into a comment to see.

I also use neovim, I have never seen that gui-ish thing, what is the command to activate that?

@luizkowalski
Copy link
Author

luizkowalski commented May 1, 2023

Couldn't copy but I guess I managed somehow to see some info when right-clicking with the mouse:

This one is the .rbi file, probably "unknown file" icon
image

This one was the close button:
image

I have never seen that gui-ish thing, what is the command to activate that?

That would be Telescope with git_files command

@luizkowalski
Copy link
Author

Also, noticed that .svg files have this weird icon that looks like something in Arabic?
image

image

@Kedap
Copy link

Kedap commented May 1, 2023

I think it's a problem with the icon pack like 'neovim-web-devicons' or packages like that. Something similar happens to me but with cascadia code (original) and also with fira code (Fira Code Nerd Font). In the first case I thought it was just a cascadia code error, so I installed CaskaydiaCove but the problem persists. This all started this morning when I decided to update, which is the same archlinux.

firacode_alfa_error

Captura de pantalla_2023-05-01_15-00-28
CaskaydiaCove NFM error
nf-mdi-format_size error render
Captura de pantalla_2023-05-01_14-56-35
The deprecated tag seems to indicate something

This is the same with other icons. But something curious is that Caskaydia is installed in kitty and FiraCode in wezterm and with wezterm if I can see the second icon
text

I think a lot of popular icons are marked as deprecated and therein lies the problem. As far as I see what happens, I will continue to regret updating :(

@luizkowalski
Copy link
Author

oh, good find! yeah, the X icon (F655) is obsolete too, which proves your point

@Kedap
Copy link

Kedap commented May 1, 2023

For example:
onsails/lspkind.nvim#64

@luizkowalski
Copy link
Author

there is a PR for it already on nvim tree devicons too: nvim-tree/nvim-web-devicons#264

@Finii Finii changed the title [X] glyph missing after latest update Some glyphs missing after latest update May 2, 2023
@Finii Finii pinned this issue May 2, 2023
@Finii
Copy link
Collaborator

Finii commented May 2, 2023

Reason

Historically Nerd Fonts patched the Material Design Icons to codepoints F500 - FD46. The problem with part of these codepoints is that they are not 'free to use' (what Unicode calls PUA), but contain glyphs that are needed for some non-english languages.
There are a lot issues raised, and rightfully so. The problem has been discussed at length here:

Additionally people wanted the Material Design Icons to update. The problem with that was that the number of icons increased considerably; and the MDI themselves moved codepoints to PUA-A. Several solutions have been discussed and what finally has been choosen was this:

Strategy

That moving codepoints would hurt you was clear. On the other hand imagine that someone stole you the capital letter A to put some obscure icon there. To lessen the hurt the new codepoints have been activated with Nerd Fonts v2.3.0 already and hinted that people should migrate to the new codepoints "now" (Compare its release notes):

Screenshot 2023-05-02 at 08 30 48

Some projects did it, some people wrote codepoint converters (unfortunately I did not compile a list, maybe we could do it in this thread). For sure most people did not see the release notes 🙄

To help people the icons have been tagged in the cheat sheet, and there is now a 'database' of the icons [1], and a rough translation list [2].

Finally with the major release the new codepoints (and new icons) are the only codepoints to reach the Material Design Icons:

[1] https://github.com/ryanoasis/nerd-fonts/blob/master/glyphnames.json
[2] #1059 (comment) (open the details in this comment)

Edit: Add word 'raised' in 1st paragraph

@Finii Finii added confirmed not-a-bug not only wontfix but this is actually wanted labels May 2, 2023
@Finii
Copy link
Collaborator

Finii commented May 2, 2023

Also, noticed that .svg files have this weird icon that looks like something in Arabic?

See 'reason' above. That codepoint IS the codepoint for that Arabic glyph. Imagine you want to write something and instead of the expected glyph (equivalent to letter A) you get some weird icon.

Well, I hope you will not be too angry and frustrated, understanding the reason. Nerd Fonts got that unfortunately wrong from the start, and at some point in time we should stick to the standard.

This one is the .rbi file, probably "unknown file" icon

Where does the rbifile come from (which project)? Some plugin? We should raise an issue there.

@Finii
Copy link
Collaborator

Finii commented May 2, 2023

To help more we could show the replacement codepoint in the cheat sheet. Would that help?

But sometimes the updated MDI looks different (well that is the reason for the MDI update), or has been dropped completely meanwhile.

@luizkowalski
Copy link
Author

Where does the rbifile come from (which project)? Some plugin? We should raise an issue there.

Ruby's Sorbet file type. Developers don't really touch this file, it is autogenerated and you are highly encourage to leave like this, that's why, personally, never bothered me the unknown file

@rj1
Copy link

rj1 commented May 2, 2023

i'm experiencing the same/similar issue using the ttf-hack-nerd package on arch linux.

all of a sudden i'm missing a bunch of symbols that worked fine before, a few examples:

{ "", "", "", "", "", "" }

@luizkowalski
Copy link
Author

@rj1 if I understand correctly (and Finii can correct me if I'm wrong cause I'm just learning all of this), it is not a Nerd Font's issue. It was announced previously that Material Icons (probably the missing symbols you are seeing) were to be deprecated due to them not being free. if anyone is to blame, is whatever library you are using to render these symbols (e.g. vim's devicons). You should go to their repository and check open issues

@Finii
Copy link
Collaborator

Finii commented May 2, 2023

it is not a Nerd Font's issue

Well, it kind of is, but is not-a-bug. The symbols needed to change their codepoints.

deprecated due to them not being free

The icons were free and they are still there, but the codepoints were not free, they are needed for non-latin texts. To occupy codepoints that are not free-to-use has been an oversight years ago when non-latin texts were not a consideration.

You should go to their repository and check open issues

Definitively. Or raise an issue there. Link to this thread in your report there.

@Finii
Copy link
Collaborator

Finii commented May 2, 2023

Collection of helper projects

https://github.com/loichyan/nerdfix
https://gist.github.com/mischw/78e8e42c2ebb1069560a2fc4573b1425
#1059 (comment) (open details)

Big thanks to the respective authors!

@rj1
Copy link

rj1 commented May 2, 2023

thx!

in my case it's just some symbols i've pasted from https://unicodes.jessetane.com/ into my neovim config

@mischw's python script is v helpful & managed to get most of them, but there's still a couple that either don't render or render something completely different than before :(

update: turns out the two symbols are now obsolete for some reason..

Icon 'nf-mdi-square_inc' is marked as obsolete
Icon 'nf-mdi-glassdoor' is marked as obsolete

@rootex-
Copy link

rootex- commented May 2, 2023

I can also confirm the problem:
Screenshot 2023-05-02 at 15 37 37

To compare it with another working font:
Screenshot 2023-05-02 at 15 36 32

@rootex-
Copy link

rootex- commented May 2, 2023

nerdfix utility has helped me to find missing symbols and replace them by hand

@siduck
Copy link

siduck commented May 3, 2023

hi @Finii is this folder icon removed?

image

Copy it from site gives me another icon ( cuz the site isnt updated to v3.0 )
image

But i wasnt able to find it by fontforge too

@Finii
Copy link
Collaborator

Finii commented Jun 2, 2023

@wez

there is automation that scrapes the name -> symbol mapping from the various scripts

If you want to stick to that, I would suggest using (i.e. executing) the i_all.sh, as that will not return the removed icons (unless asked to). The information i_all.sh collects can then be automated further, see https://github.com/ryanoasis/nerd-fonts/blob/master/bin/scripts/generate-css.sh as example.

But I guess glyphnames.json is even better for you.

@Finii
Copy link
Collaborator

Finii commented Jun 5, 2023

@allcontributors add @loichyan for tool

@allcontributors
Copy link
Contributor

@Finii

This project's configuration file has malformed JSON: .all-contributorsrc. Error:: Unexpected string in JSON at position 35211

@Finii
Copy link
Collaborator

Finii commented Jun 5, 2023

@allcontributors add @loichyan for tool

@allcontributors
Copy link
Contributor

@Finii

I've put up a pull request to add @loichyan! 🎉

@cabiamdos
Copy link

cabiamdos commented Jul 4, 2023

I have here a patch-solution that I have implemented (https://github.com/cabiamdos/nerd-fonts-fix). Hope it is useful. Basically I have remapped the available theme icons (unicodes) into the ones that are in the fonts provided into the repository.

randomicecube added a commit to randomicecube/gaspafiles that referenced this issue Jul 6, 2023
Relates to an [already existing issue](ryanoasis/nerd-fonts#1190 (comment))
on nerd-fonts' repo.
@jpcercal
Copy link

jpcercal commented Jul 7, 2023

I've been using nerdfonts with zsh + starship + iTerm2, thanks for the great work everyone!

nerdfix managed to solve the problem, I had only one file that had to be patched as it can be seen below.

./nerdfix fix ~/dotfiles/starship.toml:

# Auto fix it using last input '󰇁'
note: Found obsolete icon U+FA1E
    ┌─ /Users/jpcercal/dotfiles/starship.toml:128:12
    │
128 │ format = "[羽](bold cyan)[took $duration](bold cyan) [❯](dimmed white) "
    │            ^^ Icon 'nf-mdi-timer_sand' is marked as obsolete
    │
    = You could replace it with:
          1. 󰔟 U+F051F nf-md-timer_sand
          2. 󱦠 U+F19A0 nf-md-timer_sand_paused
          3. 󰞌 U+F078C nf-md-timer_sand_full
          4. 󰚭 U+F06AD nf-md-timer_sand_empty

> Input an icon: 󰔟
# Your input: 󰔟 nf-md-timer_sand
> Are your sure to write the patched content? all yes

The full file changes after the nerdfix command got executed can be found here:
jpcercal/dotfiles@23898f0

Reference:
https://github.com/loichyan/nerdfix

Thanks!

@Finii
Copy link
Collaborator

Finii commented Mar 30, 2024

I guess we can close this issue now. It will still be pinned for some time.

@Finii Finii closed this as not planned Won't fix, can't repro, duplicate, stale Mar 30, 2024
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
confirmed not-a-bug not only wontfix but this is actually wanted
Projects
None yet
Development

No branches or pull requests