nerd-fonts icon indicating copy to clipboard operation
nerd-fonts copied to clipboard

Some glyphs missing after v3.x.x update

Open luizkowalski opened this issue 2 years ago • 52 comments

🗹 Requirements

  • [X] I have searched the issues for my issue and found nothing related and/or helpful
  • [X] I have searched the FAQ for help
  • [X] 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

luizkowalski avatar May 01 '23 19:05 luizkowalski

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

Finii avatar May 01 '23 19:05 Finii

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)

dbuch avatar May 01 '23 19:05 dbuch

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?

Finii avatar May 01 '23 19:05 Finii

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 avatar May 01 '23 19:05 luizkowalski

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

image

luizkowalski avatar May 01 '23 19:05 luizkowalski

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 :(

Kedap avatar May 01 '23 21:05 Kedap

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

luizkowalski avatar May 01 '23 21:05 luizkowalski

For example: https://github.com/onsails/lspkind.nvim/pull/64

Kedap avatar May 01 '23 21:05 Kedap

there is a PR for it already on nvim tree devicons too: https://github.com/nvim-tree/nvim-web-devicons/pull/264

luizkowalski avatar May 01 '23 21:05 luizkowalski

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:

  • #365

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:

  • #773

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].

  • #1097

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

  • #1156

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

Edit: Add word 'raised' in 1st paragraph

Finii avatar May 02 '23 07:05 Finii

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 avatar May 02 '23 07:05 Finii

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.

Finii avatar May 02 '23 07:05 Finii

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

luizkowalski avatar May 02 '23 07:05 luizkowalski

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:

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

rj1 avatar May 02 '23 08:05 rj1

@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

luizkowalski avatar May 02 '23 08:05 luizkowalski

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 avatar May 02 '23 09:05 Finii

Collection of helper projects

https://github.com/loichyan/nerdfix https://gist.github.com/mischw/78e8e42c2ebb1069560a2fc4573b1425 https://github.com/ryanoasis/nerd-fonts/issues/1059#issuecomment-1404891287 (open details)

Big thanks to the respective authors!

Finii avatar May 02 '23 09:05 Finii

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

rj1 avatar May 02 '23 09:05 rj1

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- avatar May 02 '23 12:05 rootex-

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

rootex- avatar May 02 '23 13:05 rootex-

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

siduck avatar May 03 '23 08:05 siduck

They (octicons) obviously modernized/updated that glyph... We updated to the latest octicons with v3.0.0

image

Edit: Changed to more meaningful image

Finii avatar May 03 '23 09:05 Finii

Are you sure that's just a modernized version? For example, the icon in the 4th column of the 2nd row, I can't imagine that the old and new version serves the same purpose. image

musjj avatar May 03 '23 09:05 musjj

Some icons have been dropped without replacement. We 'compress' the glyph-map, so that newly added icons fill up the gaps. Otherwise we would run out of codepoints rather soon.

Here the update process log

Reading mapping file
Found 172 entries
Fetching octicons archive "v18.2.0.tar.gz"


Unpacking octicons archive
Found 574 svgs
Found 308 icons after de-duplicating

Renamed cloud-download -> download
Renamed cloud-upload -> upload
Renamed clippy -> paste
Renamed mail-read -> read
Renamed primitive-dot -> dot-fill
Renamed primitive-square -> square-fill
Renamed settings -> sliders
Renamed dashboard -> meter
Renamed trashcan -> trash
Renamed paintcan -> paintbrush

Missing octoface
Missing keyboard
Missing gist
Missing file-text
Missing file-pdf
Missing jersey
Missing radio-tower
Missing repo-force-push
Missing mail-reply
Missing arrow-small-right
Missing gist-secret
Missing no-newline
Missing arrow-small-up
Missing arrow-small-down
Missing arrow-small-left
Missing file-symlink-directory
Missing circuit-board
Missing watch
Missing text-size
Missing ellipses
Missing plus-small

Found 151 (of 172, missing 21) and new 157

Obviously keyboard has been dropped and we fill/reuse it's space with some newly added icon. See also #1156

Finii avatar May 03 '23 10:05 Finii

They (octicons) obviously modernized/updated that glyph... We updated to the latest octicons with v3.0.0

image

Edit: Changed to more meaningful image

Can I make a new font with just the file-directory icon and set different endpoint for it? is this possible

siduck avatar May 04 '23 03:05 siduck

There's a couple filled versions of the folder icon around the bottom right. Maybe use that?

musjj avatar May 04 '23 06:05 musjj

There's a couple filled versions of the folder icon around the bottom right. Maybe use that?

I know that but I want this one only specifically, it looks good.

Atom used to use it, doom emacs uses it too

image

I've used it in my nvim config as well

image

siduck avatar May 04 '23 06:05 siduck

Updated the cheat-sheet to (hopefully) communicate in a more clear way what happened:

image

This is how it looks like when following the example in the bottom, to find out where a removed glyph moved to:

image

And if you enter a codepoint you can see old and new content side by side (because the cheat-sheet secretly also loads the v2.3.3 font to be able to show the removed icons):

image

Hope this helps.

Finii avatar May 04 '23 10:05 Finii

After recent update, a branch of font change into chinese words, as you can see below.

Screenshot_2023-05-06-21-59-07_3658

thyeun avatar May 06 '23 14:05 thyeun

After recent update, a branch of font change into chinese words, as you can see below.

@thyeun Great! So it does work! Finally we freed the Chinese words and one can write correctly. (I.e. this is wanted and needed and not a bug)

You probably need to follow the codepoint movement with your setup; there are several hint above.

Finii avatar May 07 '23 07:05 Finii