ryanoasis / nerd-fonts

Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more
https://NerdFonts.com
Other
53.84k stars 3.63k forks source link

New material design icon block icons are much smaller and thus less readable. #1061

Closed Dragon-Hatcher closed 1 year ago

Dragon-Hatcher commented 1 year ago

πŸ—Ή Requirements

🎯 Subject of the issue

Experienced behavior: Identical icons from the old and new material design blocks render much smaller in the new block and are thus less readable.

Expected behavior: Identical icons from the old and new material design blocks should render the same.

Example symbols: U+F631 (Old) vs U+F0132 (New) U+F503 (Old) vs U+F0004 (New)

πŸ”§ Your Setup

β˜… Screenshots (Optional)

image (Note that Kitty squishes icons into one cell when there is no trailing space and expands them to full size when there is. The first two icons in each section have a trailing space. Periods for scale. Here is the command I ran: echo -e 'Old: U+F631   | U+F503   |\nNew: U+F0132 σ°„² σ°„² σ°„²σ°„²| U+F0004 󰀄 󰀄 󰀄󰀄|\n....................................')

Finii commented 1 year ago

Hmm. Will check the scaling.Β  It differs in methodics.Β 

Anyhow, bigger symbols should be in Symbols Only Nerd Font.ttf (without Mono). Maybe :thinking:

I will have a look.Β 


From: Dragon-Hatcher @.***> Sent: Saturday, 21 January 2023 02:06 To: ryanoasis/nerd-fonts Cc: Subscribed Subject: [ryanoasis/nerd-fonts] New material design icon block icons are much smaller and thus less readable. (Issue #1061)

πŸ—Ή 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: Identical icons from the old and new material design blocks render much smaller in the new block and are thus less readable. Expected behavior: Identical icons from the old and new material design blocks should render the same. Example symbols: U+F631 (Old) vs U+F0132 (New) U+F503 (Old) vs U+F0004 (New) πŸ”§ Your Setup Which font are you using (e.g. Anonymice Powerline Nerd Font Complete.ttf)? Symbols-2048-em Nerd Font Complete Mono.ttf Where did you get the file from (download link, self patched, source downloaded from link...) Downloaded from the release page (version 2.3.1) Which terminal emulator are you using (e.g. iterm2, urxvt, gnome, konsole)? Kitty Are you using OS X, Linux or Windows? And which specific version or distribution? Linux Mint 21, Cinnamon β˜… Screenshots (Optional)

(Note that Kitty squishes icons into one cell when there is no trailing space and expands them to full size when there is. The first two icons in each section have a trailing space. Periods for scale. Here is the command I ran: echo -e 'Old: U+F631   | U+F503   |\nNew: U+F0132 σ°„² σ°„² σ°„²σ°„²| U+F0004 󰀄 󰀄 󰀄󰀄|\n....................................') β€” Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Dragon-Hatcher commented 1 year ago

Actually they are all small for me with the non mono version. image

Finii commented 1 year ago

Hmm, in the font new (bottom) and old (top row) account is exactly the same size:

image

Well. The Nerd Font Mono font is (as I predicted ;) different. Here the scaling changed:

image

While the old scaling (top row) the icons are individually scaled, the new scaling produces different (usually smaller) scaling. The reason is, and to show this I added account-alert, that related glyphs are scaled with the same factor.

Assume someone who wants to show account or account-alert in a table depending on some data. The 'person' is now the same size in both cases. Another usecase is a battery icon used to show the battery state. There is also a 'battery-broken' icon with a stroke-out battery, which would be smaller if scaled individually.

See more example for 'glyph sets' that should be all scaled identical for best user experience: https://github.com/ryanoasis/nerd-fonts/pull/773#issuecomment-1023497439

Dragon-Hatcher commented 1 year ago

Ah. I understand the rational for the resizing now. Does it make sense to keep the old ones different as an option for a larger scale then? Seems weird though considering they will be removed.

Finii commented 1 year ago

We could add individual scale-groups, but with 8000 icons that approach sounded rather maintenance intensive, or at least the initial work that has to be put into it is a bit high, given I'm just one person ;-D

So, I have no real solution for that, open for all suggestions.

Dragon-Hatcher commented 1 year ago

Oh. Are you saying that every icon is scaled the same amount as every other icon but they could be larger if someone put in the work to figure out which icons needed to be scaled together?

I might be willing to look into doing that. Would, for example, various sets of codepoint ranges be sufficent?

Dragon-Hatcher commented 1 year ago

This also creates some weird artificats like this: image The King and Queen fill two cells but the rest of the pieces fit in just one so they look misaligned. Do you think scaling these together would look better?

image New Vs image Old

Same font scale

Finii commented 1 year ago

One can define groups of glyphs (codepoints). All icons in the group are 'stamped on top of each other' to create a combined bounding box. That box is than 'scaled and shifted', and the scaling/shifting values are used for all glyphs in that group.

A group can consist of a list of single codepoints or codepoint ranges.

Here is an example:

          FONTA_SCALE_LIST = {'ScaleGroups': [
              [0xf005, 0xf006, 0xf089], # star, star empty, half star
              range(0xf026, 0xf028 + 1), # volume off, down, up
              range(0xf02b, 0xf02c + 1), # tag, tags
              range(0xf031, 0xf035 + 1), # font et al
              range(0xf044, 0xf046 + 1), # edit, share, check (boxes)
              range(0xf048, 0xf052 + 1), # multimedia buttons
              range(0xf060, 0xf063 + 1), # arrows
              [0xf053, 0xf054, 0xf077, 0xf078], # chevron all directions
              range(0xf07d, 0xf07e + 1), # resize
              range(0xf0a4, 0xf0a7 + 1), # pointing hands
              [0xf0d7, 0xf0d8, 0xf0d9, 0xf0da, 0xf0dc, 0xf0dd, 0xf0de], # caret all directions and same looking sort
              range(0xf100, 0xf107 + 1), # angle
              range(0xf130, 0xf131 + 1), # mic

(At the moment) the Material Design Icons are all scaled the same because

I'm not sure that such ScaleGroups is really a realistic way. Technically I do not know if we could mix the current scale-all-alike with some groups.

Finii commented 1 year ago

The chess pieces are all the same width:

image

Not sure how you create the output.

Codepoints F0857 ff

Finii commented 1 year ago

new vs old

I can check which glyphs make the scaling so small, it seems to be not the majority ;-) But atm I need to solve 1068 :unamused:

Dragon-Hatcher commented 1 year ago

The chess pieces are all the same width: I believe Kitty scales based on rendered width not defined width. Not sure if anything can really be done about that.

Dragon-Hatcher commented 1 year ago

I can check which glyphs make the scaling so small

Just eyeballing it perhaps U+F068D nf-md-solid is the issue? If not it may be a good baseline.

Finii commented 1 year ago

Well, solid fills the whole 512x512 design space, right.

But there are other glyphs that use the full dimension at least in some directions. A combinded bounding box without F068D will still be 512x512.

image

Dragon-Hatcher commented 1 year ago

Hmm. So do you think it is feasible to increase the overall scale or no?

Finii commented 1 year ago

Just from your image (old = individually maximized icons), it seems 'a lot' of pairs are ok, but not all (blue marker) image

Then here is a look at the original icons (bottom-left) and square-individually-scaled (top right).

image

They all go wrong as you see. Worst is the 'eject' that gets ridiculously big compared with previous-track.

In principle I guess we could change to 'maximize individually' and add "groups" of icons that should be handled as one. One needs to look at one square-ish scale (i.e. Symbols Only Mono) and one very slender and tall because problems might turn up only in one of them. I guess there are no fonts out there that are wider than tall, so we do not need to check that.

Keep in mind that some people use the font for terminals, but other use them to show icons in GUIs.

So the feasibility is just a matter of examining three sets of each 7000 icons (original vs (square / oblong)). I certainly shy away from that work, as we also want to update all the sourcefonts, check renaming, potentially drop Win-Compat, add Propo, improve website (docu), ... :grimacing:

Dragon-Hatcher commented 1 year ago

Alright. I'm going to close this then until someone wants to do the work of grouping several thousand icons. Thanks for clearing this up!

Finii commented 1 year ago

We could also solve this the other way around.

NOW scale each symbol individually, and add groups for glyphs when someone complains about some mismatch concretely.

What do you think? In fact that was the way we always handled it before :grimacing:

github-actions[bot] commented 1 year ago

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.