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

Add New Material Design Icons to its own region

Open earboxer opened this issue 3 years ago • 4 comments

Description

This is an alternative to #772 . It's part of "Plan 5" Plus in #365. (another part would be to remove the old icons when we make the breaking change).

Requirements / Checklist

What does this Pull Request (PR) do?

Add the updated material design icons in its canonical location.

How should this be manually tested?

Any background context you can provide?

What are the relevant tickets (if any)?

Fixes #365

and Fixes #279

But it doesn't make any breaking changes, so this can be merged before the 3.0 release

Screenshots (if appropriate or helpful)

earboxer avatar Jan 27 '22 14:01 earboxer

I am always a bit in fear when fonts originate from webfont people. As they often do not care about codepoints and codepoint consistency (they reference glyphs by name, rather).

I examined 3 releases: 3.4.93, 4.6.95, 6.1.95 and they all differ slightly (apart from the switch to F0001), the worst is the drop of one glyph with renumbering all following ones, is that what you noticed? Between 4.x and 6.x

image

And then individual glyphs are replaced all over now and then, Notes become Cooking Pot, No Entry becomes No PianoKeys, Flower Pot? becomes Flag With Star ... just in the few glyphs shown above. And that is in all releases.

So ... is this really a basis to use?

Edit: Highlight changed icons in screeenshot

Finii avatar Jan 27 '22 17:01 Finii

Maybe I'm too skeptic with the random changes in the comment above. I could not find any changes in more recent versions. Possibly they underwent some restructuring.

What I do not like too much, but that is personal, is that the svg-to-ttf is hidden in a npm thing, but I wanted to check how they keep the glyph codepoints constant. But when I read npm, my eyes glaze over and I suddenly loose all interest.)

Finii avatar Jan 27 '22 17:01 Finii

I wanted to check how they keep the glyph codepoints constant

MaterialDesign has a meta.json (similar format that a lot of the FontAwesome-derivatives have).

With a little jq-foo:

jq 'map([.name,.codepoint])' <meta.json

But it seems like they manage their repo using external tools, so, yeah, valid concerns.

earboxer avatar Jan 27 '22 17:01 earboxer

Scrolling through all the glyphs... I believe that it needs to utilize some ScaleGlyph stuff, or some pairs will become unusable. Yes, the current one also misses it.

image image image

Maybe one ('old style') ScaleGlyph is enough, because all icons maintain a general good same-scale.

New Note: The old style ScaleGlyph is also broken :unamused:

Edit: Add note

Finii avatar Jan 27 '22 18:01 Finii

  • Rebase on master
  • Use desktop font instead of webfont
  • Create cheat sheet data
  • Force push

Finii avatar Oct 06 '22 08:10 Finii

Thanks for this (and the other 772) PR. Finally we start moving, sorry for the long wait.

There is still some unsolved problem with the scaleGlyph. A lot of paired-symbols look bad if you use them together. In principle the scaleGlyph should fix it, but ... it has problems. #837 tried to solve it, partially, and the same issue came up in #916.

Edit: Ah I already mentioned it here: https://github.com/ryanoasis/nerd-fonts/pull/773#issuecomment-1023497439

Finii avatar Oct 06 '22 08:10 Finii

Note to self: Is the cheat sheet rendering still ok with 5 digit codes?

Edit: It is.

Finii avatar Nov 17 '22 21:11 Finii

Rebase on master, force push

Finii avatar Jan 06 '23 16:01 Finii

(As expected) scaling broken, refer same glyphs in comment above

image

Introducing ScaleGlyph or ScaleGroup lets see

Finii avatar Jan 06 '23 17:01 Finii

Material Design Icons has a bug in one glyph:

image

(That strange horizontal line)

Finii avatar Jan 06 '23 18:01 Finii

Pulled bugfix 05a9ec8 already to master. Rebase, force push.

Finii avatar Jan 07 '23 08:01 Finii

Rebase on master, force push. We near us a merge and also a release :tada:

Finii avatar Jan 13 '23 12:01 Finii

This seems to be stuck: https://github.com/Templarian/MaterialDesign-Font/issues/9

So we might need to fix it on our own.

Finii avatar Jan 14 '23 14:01 Finii