-
Notifications
You must be signed in to change notification settings - Fork 478
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
material icon set renders invalid icons #1086
Comments
I don't think your |
I tried both FontAwesome and NerdFont but I get the same result as the author. Also I checked |
Weird. I just downloaded the latest version from the official source (which has been renamed back to Fira i think) and that works:
|
Have you done any modifications to
|
This override works
|
Nope, just dropped the file in
|
In "time" => " \u{e192} ", But https://www.nerdfonts.com/cheat-sheet doesnt give me that icon when I search for "clock" |
In fact, https://www.nerdfonts.com/cheat-sheet also works as a reverse search, and it can't find anything for "e192" |
Yeah i just saw the same thing. Gotta say i'm stumped |
From #57:
|
Oh darn it i just realized i do have a material icons font installed -.-
|
So... Maybe we should have two separate material icons sets? |
I don't know, does NerdFont actually include them? If not then the current implementation is probably correct. I presume @kgilmer's (and yours for that matter) issue is still that it's not the right material font on their system. As stated in the theming & icons documentation section on icon sets the It also says to specify that font in your bar config, but for me it works without that as a fallback for those codepoints. |
Their home page says yes. |
Interesting. I guess if we want to make use of them then we'd need another mapping, yes |
Yeah, the patched font works. Sort of. Instead of memory icon i have a stormy cloud. And yes, many icons are just missing. But that's the other issue. I would consider adding a new icon set for "the other material" icons. |
Hmm I never noticed we are dependent on some random gist for the material icons... I wonder how many people are actually using it. I don't understand the reason why the official font can't be used (vertical spacing issues??), but if there's no actual problem then I feel like we should use the official font by default. |
There are some horizontal spacing issues. But there is a solution: wrap each icon into pango's music = " <span size='medium' font_family='NotoSans Nerd Font'>\uf886</span> " And I think this could be a global configuration option: icons_style = "size='medium' font_family='NotoSans Nerd Font'" But most of the icons just work. |
Looks similar to what was proposed in #981 |
Yeah, I see, that's exactly the same. |
I didn't expect such a lively discussion, but happy to see it! 😄 I was not using Nerd Fonts @GladOSkar and so I tried doing that by performing the following steps:
Is there something I've missed or bungled here? Any other tips or troubleshooting suggestions? Additional Info
|
@kgilmer You don't need Nerd Fonts to use #1095 Adds a new material icon set that should work with any font form Nerd Fonts. |
So to summarise, our "material" icon setting is useless when using the official Google Material font or the aggregated Nerd Fonts, and only works with that random patched font that's only available in that gist? "works" meaning the mappings point to the intended icons |
I think so, yes. I don't know if that random patched font was based on some official mapping that we don't know about though. |
I am leaning towards replacing it with the official Google Material font. Looks like that PR was made around 2017 so can check if the mappings changed between then and now. |
I wonder how many people are using that feature since it would break for all of them in that case of course |
Yes it would, perhaps it could be left as "material-legacy" or something, but having it as the "main" one seems wrong. Even more so if the official font has undergone changes and the patched one has been left untouched this whole time. |
OK this is getting confusing so I want to try make a comparison table (might take a while to complete). Google Material Design icons "MDI" Material Design icons by MaterialDesignIcons.com (annoyingly they don't seem to mention Google anywhere) Nerd Fonts which includes MaterialDesignIcons.com, possibly patched. Codepoints are different. "Patched" icons from that gist
|
I was able to resolve the issue with your help, thank you! I am using the JetBrains Mono font from NerdFonts. I see that the icons are smaller than the text, is this expected? From screenshots in the readme, I can see the fontawesome-based screenshots appear to have icon and text at roughly the same size... My font specification in i3 config file is In any case, thanks again and I won't close the issue as looks like there is work going on in here but you can consider my issue resolved. |
@kgilmer You can try to add this in your config: icons_format = " <span size='large'>{icon}</span> " |
So it turns out the codepoints we have for the As for MDI, the codepoints are different to aggregated Nerd Fonts one. I mapped most of them int he table above, so if someone wants to add |
Environment:
Ubuntu 20.04
i3-gaps
i3status-rs
Material font installed:
i3status-rs config:
Steps to reproduce:
Expected behavior: material icons show on bar

Actual behavior:
FWIW the FontAwesome icon setting does not produce the "unknown unicode" charaters but also doesn't seem to map to the intended glyphs.
Other notes
$ fc-list | grep -i material /usr/share/fonts/truetype/materialdesignicons-webfont/materialdesignicons-webfont.ttf: Material Design Icons:style=Regular
FWIW I believe that the mappings from character code to icon have changed in the material design icon font in version 1.6 of that package (debian).
I checked this issue but nothing there resulted in working behavior on my system
The text was updated successfully, but these errors were encountered: