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

Theme material-nf3 #1728

Merged
merged 2 commits into from
May 1, 2023
Merged

Theme material-nf3 #1728

merged 2 commits into from
May 1, 2023

Conversation

bim9262
Copy link
Collaborator

@bim9262 bim9262 commented Feb 18, 2023

Update material-nf

The nf-mdi-* icons have been deprecated. This commit exchanges them
for their nf-md counterparts.

Add thermometer progression for material-nf

@ammgws
Copy link
Collaborator

ammgws commented Feb 18, 2023

In reference to this: ryanoasis/nerd-fonts#1096 / ryanoasis/nerd-fonts#773 ?

What was the difference between nf-mdi and nf-md? I can't remember...

@bim9262
Copy link
Collaborator Author

bim9262 commented Feb 18, 2023

Yes, I think that they moved the old mdi icons to a new region so they renamed them all to just md so the names wouldn't overlap as well. I will note that the new icons do render a bit smaller than the old ones.

@ammgws
Copy link
Collaborator

ammgws commented Feb 18, 2023

I will note that the new icons do render a bit smaller than the old ones.

Apparently...
ryanoasis/nerd-fonts#1061

I imagine getting a few bug reports from that alone..

@Finii
Copy link

Finii commented Feb 20, 2023

I will fix 1061 before v3.0.0 goes out.

@bim9262
Copy link
Collaborator Author

bim9262 commented Feb 23, 2023

Perhaps this should become a new theme, material-nf3?

@ammgws
Copy link
Collaborator

ammgws commented Feb 23, 2023

So if nerd fonts v3.0.0 is going to not just deprecate but also remove the codepoints that we are currently using then we should probably create material-nf3.

@bim9262
Copy link
Collaborator Author

bim9262 commented Feb 23, 2023

v2 does write glyphs outside of the PUA. As noted on ryanoasis/nerd-fonts#365:

It is the problem that font_patcher writes glyphs from Material into the range: U+F500 - U+FD46. This range overlaps areas that should not use for such purpose.

One of the last comments from @Finii:

Yes, according to plan this will come (glyphs removed) with v3.0.0, this was just one necessary intermediate step.

So, if I understand correctly, some of the codepoints we use in today's material-nf will be removed in v3.

@Finii
Copy link

Finii commented Feb 23, 2023

@bim9262

Citation from https://github.com/ryanoasis/nerd-fonts/releases

Screenshot 2023-02-23 at 08 41 01

Codepoint 'translation list' can be found here: ryanoasis/nerd-fonts#1059 (comment)

Edit: Add translation list link

@bim9262
Copy link
Collaborator Author

bim9262 commented Feb 23, 2023

Thanks @Finii!!

@ammgws, I'll rename this material-nf3

Finii added a commit to ryanoasis/nerd-fonts that referenced this pull request Feb 23, 2023
[why]
The Material Design Icons have for sure pairs of glyphs that people
would like to have scaled identically. Because the sheer number of
glyphs and because they are already very nicely and uniformly scaled
within their design space the MDI at the new codepoints where all scaled
the same with taking the theoretical design space as ScaleGlyph.

But that means all icons get scaled a bit smaller than before, where we
individually scaled each Material Design Icon to fill the cell.
This lead to numerous complaints.

[how]
We take a different approach now, more conventional maybe. Especially in
the light that the older bigger icons will get dropped; and people love
them.
So the uniform scaling is ditched and the individual scaling is used.

Fixes: #1061
Note: greshake/i3status-rust#1728

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Finii added a commit to ryanoasis/nerd-fonts that referenced this pull request Feb 23, 2023
[why]
The Material Design Icons have for sure pairs of glyphs that people
would like to have scaled identically. Because the sheer number of
glyphs and because they are already very nicely and uniformly scaled
within their design space the MDI at the new codepoints where all scaled
the same with taking the theoretical design space as ScaleGlyph.

But that means all icons get scaled a bit smaller than before, where we
individually scaled each Material Design Icon to fill the cell.
This lead to numerous complaints.

[how]
We take a different approach now, more conventional maybe. Especially in
the light that the older bigger icons will get dropped; and people love
them.
So the uniform scaling is ditched and the individual scaling is used.

Fixes: #1061
Note: greshake/i3status-rust#1728

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

bim9262 commented Feb 23, 2023

Looks great @Finii, thanks!!

If anyone else wants to test and hasn't built a font before, this is what I did on arch:

sudo pacman -S fontforge
cd /tmp
git clone --depth 1 https://github.com/ryanoasis/nerd-fonts.git
cd nerd-fonts
./font-patcher -s -ext ttf -c -out ~/.local/share/fonts/ src/unpatched-fonts/NerdFontsSymbolsOnly/NerdFontsSymbols\ 2048\ EM\ Nerd\ Font\ Complete\ Blank.sfd

Restart i3status-rust

@bim9262 bim9262 changed the title Theme material nf Theme material-nf3 Feb 24, 2023
@bim9262
Copy link
Collaborator Author

bim9262 commented Mar 6, 2023

@MaxVerevkin, @ammgws,

Anything that should be done before this is merged?

@Finii
Copy link

Finii commented Mar 6, 2023

If anyone else wants to test and hasn't built a font before, this is what I did on arch:

sudo pacman -S fontforge
cd /tmp
git clone --depth 1 https://github.com/ryanoasis/nerd-fonts.git
cd nerd-fonts
./font-patcher -s -ext ttf -c -out ~/.local/share/fonts/ src/unpatched-fonts/NerdFontsSymbolsOnly/NerdFontsSymbols\ 2048\ EM\ Nerd\ Font\ Complete\ Blank.sfd

Cloning the repo even with depth 1 is rather time consuming. I would recomment using the docker image (well, that needs some docker setup), or

 sudo pacman -S fontforge
 cd /tmp
-git clone --depth 1 https://github.com/ryanoasis/nerd-fonts.git
+mkdir nerd-fonts
 cd nerd-fonts
+curl -LO https://github.com/ryanoasis/nerd-fonts/raw/master/FontPatcher.zip 
+unzip FontPatcher.zip
 ./font-patcher -s -ext ttf -c -out ~/.local/share/fonts/ src/unpatched-fonts/NerdFontsSymbolsOnly/NerdFontsSymbols\ 2048\ EM\ Nerd\ Font\ Complete\ Blank.sfd

Edit: Oh sorry, I see you use the empty template .sfd, which is of course not in the zip archive. So this is not really helpful, except you want to patch something you already have.

@ammgws
Copy link
Collaborator

ammgws commented Mar 6, 2023

@MaxVerevkin, @ammgws,

Anything that should be done before this is merged?

I was thinking perhaps we should instead keep material-nf pointed towards the latest version, and instead introduce material-nf2.3 as a legacy option instead.

@bim9262
Copy link
Collaborator Author

bim9262 commented Mar 7, 2023

We may want to wait until the next nerd-fonts release so that we don't have complaints about the small icons. (I imagine most people haven't installed them from src)

@bim9262 bim9262 marked this pull request as draft March 7, 2023 00:45
@bim9262
Copy link
Collaborator Author

bim9262 commented Mar 21, 2023

Just saw

net_wireless = [
"\U000F092F", # nf-md-wifi_strength_outline
"\U000F091F", # nf-md-wifi_strength_1
"\U000F0922", # nf-md-wifi_strength_2
"\U000F0925", # nf-md-wifi_strength_3
"\U000F0928", # nf-md-wifi_strength_4
]
. We might just end up with this commit done piecemeal. Do we want to keep nf-md-* out of material-nf.toml still? It feels like we'll muddle the line between material-nf2.3.toml and material-nf.toml.

@MaxVerevkin
Copy link
Collaborator

Do we want to keep nf-md-* out of material-nf.toml still?

If I understand it correctly, the reason we don't just switch to nf-md-* is icons' size. I didn't notice any scaling issues with the wifi icons, so I added them. If the scaling issues will be resolved, I see no point in splitting material-nf in two themes.

@ammgws
Copy link
Collaborator

ammgws commented Apr 7, 2023

The split was aimed at people using specific distros where they might have nerdfonts in the repo but not i3status-rust, and end up with the former lagging behind the latter which would be updated by the user. But I just checked the nerd-fonts repo and it seems like it's not even in Debian or Ubuntu repos (the usual suspects) so maybe we don't need to keep the legacy icon set?

@bim9262
Copy link
Collaborator Author

bim9262 commented Apr 8, 2023

All of the codepoints we're using (both nf-mdi and nf-md) are available in 2.3, so as long as the major repos that have nerdfonts are at least that up to date it shouldn't be required to keep two icon sets around.

@ammgws
Copy link
Collaborator

ammgws commented Apr 8, 2023

Ok that makes things simpler then

The `nf-mdi-*` icons have been deprecated as of `v2.3.x`.
This commit exchanges them for their `nf-md` counterparts.

From https://github.com/ryanoasis/nerd-fonts/releases/tag/v2.3.3:

> The `v2.3.x` release has both, the 'old' and the 'new' codepoints to
> enable you an easier transition. Please change already now your
> prompts and other uses to the new codepoints. Release `v3.0.0` will
> finally drop the old codepoints (`F500` - `FD46`).
@bim9262 bim9262 marked this pull request as ready for review April 30, 2023 23:02
@bim9262
Copy link
Collaborator Author

bim9262 commented Apr 30, 2023

v3.0.0 has been released, congratulations @Finii!

@MaxVerevkin MaxVerevkin merged commit c99b610 into greshake:master May 1, 2023
@MaxVerevkin
Copy link
Collaborator

Yay, Nerd Font Propo makes spacing even without icons_format hacks 🎉

LNKLEO pushed a commit to LNKLEO/Nerd that referenced this pull request Nov 24, 2023
[why]
The Material Design Icons have for sure pairs of glyphs that people
would like to have scaled identically. Because the sheer number of
glyphs and because they are already very nicely and uniformly scaled
within their design space the MDI at the new codepoints where all scaled
the same with taking the theoretical design space as ScaleGlyph.

But that means all icons get scaled a bit smaller than before, where we
individually scaled each Material Design Icon to fill the cell.
This lead to numerous complaints.

[how]
We take a different approach now, more conventional maybe. Especially in
the light that the older bigger icons will get dropped; and people love
them.
So the uniform scaling is ditched and the individual scaling is used.

Fixes: ryanoasis#1061
Note: greshake/i3status-rust#1728

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The codepoints for material-nf will have to move before nerd-fonts 3.0.0
4 participants