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

Add New Material Design Icons to its own region #773

Merged
merged 9 commits into from
Jan 15, 2023

Conversation

earboxer
Copy link
Contributor

@earboxer earboxer commented Jan 27, 2022

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)

readme.md Show resolved Hide resolved
@Finii
Copy link
Collaborator

Finii commented Jan 27, 2022

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
Copy link
Collaborator

Finii commented Jan 27, 2022

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

@earboxer
Copy link
Contributor Author

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.

@Finii
Copy link
Collaborator

Finii commented Jan 27, 2022

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 😒

Edit: Add note

@Finii
Copy link
Collaborator

Finii commented Oct 6, 2022

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

@Finii
Copy link
Collaborator

Finii commented Oct 6, 2022

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: #773 (comment)

@Finii
Copy link
Collaborator

Finii commented Nov 17, 2022

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

Edit: It is.

@Finii
Copy link
Collaborator

Finii commented Jan 6, 2023

Rebase on master, force push

@Finii
Copy link
Collaborator

Finii commented Jan 6, 2023

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

image

Introducing ScaleGlyph or ScaleGroup lets see

@Finii
Copy link
Collaborator

Finii commented Jan 6, 2023

Material Design Icons has a bug in one glyph:

image

(That strange horizontal line)

Finii added a commit that referenced this pull request Jan 7, 2023
[why]
In some cases only some ScaleRule glyphs are used.

[how]
Store mixture of integers and ranges for ScaleGlyph (as is done for
ScaleGroups).

Correctly evaluate mixture of integers and ranges.

[note]
Came up with PR #773

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@Finii
Copy link
Collaborator

Finii commented Jan 7, 2023

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

earboxer and others added 5 commits January 13, 2023 12:59
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We want to differentiate between the old, problematic Material Design
Icons (problematic because we map them to unicode blocks that we should
not), and a future new and updated set of Material Design Icons.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Material Design Icons has grown quite a bit.

[how]
Add the icons at their original position which is in PUA1.
Use the desktop font instead of the webfont.
Add cheat cheat file.

Fixes: ryanoasis#365

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The files sizes of otf files are (especially with the addition of the
current Material Design Icons) big enough already. The autohints are not
really useful for symbols, so we can drop them and save some space.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
ScaleGlyph always did scaling only (no translation) based on one
reference glyph.

ScaleGroups does scaling and translation but can not work with one
reference glyph but constructs always a combined bounding box.

Missing is a way to scale AND translate, but with only one reference
glyph.

[how]
Invent GlyphsToScale+ keyword, that supports just that.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Scaling the glyphs individually breaks a lot of glyph pairs or groups,
for example F0718-F071E.

[how]
Use one ScaleGlyph for the complete set. The set itself is already very
well scaled, i.e. all glyphs are maximized in a given design space and
that they look good next to pairing glyphs.
There is no need to use ScaleRules which is quite costly for such a big
range of glyphs (they all are copied twice in the process).

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@Finii
Copy link
Collaborator

Finii commented Jan 13, 2023

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

@Finii
Copy link
Collaborator

Finii commented Jan 14, 2023

This seems to be stuck: Templarian/MaterialDesign-Font#9

So we might need to fix it on our own.

[why]
The glyph 0xF1522 is broken.

See:
ryanoasis#773 (comment)
Templarian/MaterialDesign-Font#9

[how]
Manually edit in fontforge and remove line. Export as simple ttf.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@Finii Finii merged commit a0b6a5b into ryanoasis:master Jan 15, 2023
LNKLEO pushed a commit to LNKLEO/Nerd that referenced this pull request Nov 24, 2023
[why]
In some cases only some ScaleRule glyphs are used.

[how]
Store mixture of integers and ranges for ScaleGlyph (as is done for
ScaleGroups).

Correctly evaluate mixture of integers and ranges.

[note]
Came up with PR ryanoasis#773

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
LNKLEO pushed a commit to LNKLEO/Nerd that referenced this pull request Nov 24, 2023
[why]
The glyph 0xF1522 is broken.

See:
ryanoasis#773 (comment)
Templarian/MaterialDesign-Font#9

[how]
Manually edit in fontforge and remove line. Export as simple ttf.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
LNKLEO pushed a commit to LNKLEO/Nerd that referenced this pull request Nov 24, 2023
Add New Material Design Icons to its own region
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

Successfully merging this pull request may close these issues.

[Suggestion] Fix invalid code points for some glyphs Material Design Icons missing some icons
2 participants