-
Notifications
You must be signed in to change notification settings - Fork 38
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
Characters with an underscore in their name will get a default IconXXX name #6
Comments
I did not use the css file (maybe should have), just uploaded the ttf and clicked copy to clipboard. |
Let me know how it works for you, and if it does, please close the issue. Does the CSS feature makes sense to you? Let me know if you have ideas of how to improve the tool. Thanks. |
The tool works great, and also when using the css file, it works as expected. But if you omit the css file then the behavior as I described happens. You might improve the tool by parsing the names correctly when not using a css file. (And then I assume that the individual glyphs have names in the ttf file, but with underscores in them). |
Actually no, the font doesn't have glyphs with names, you can see it on the left side, there's a blank above the hex value (if the glyph name exists, it's being displayed): It might be confusing that even though the font has no names for any of the glyphs, you could still see that some of the glyphs do get a name in the C# code: This is because of I have a mapping between some known fonts and their CSS/ijmap counterpart, like how I described here. I could probably think of another way to do the mapping (beside the name, maybe use the version too?) but it can become complicated since versions can change... Ideally the guy who forked from Google's font should had used another font name, because he created a different font. |
Great explanation! You are right, I did assume there were names in the font because the only file I supplied was the font file and nothing else. The problem with Google's material font is that google does not update it anymore. There are a lot of new icons in the material library, but the font file is not updated, so it is not complete. I think you should not make another way of doing the mapping, don't make it more complicated. Maybe you could add some counters to the website:
Thanks, I learned something today! |
It looks like individual fonts that have an underscore in their name will get a default name like
IconXXX
See for example this font:
https://github.com/jossef/material-design-icons-iconfont/blob/master/dist/fonts/MaterialIcons-Regular.ttf
It has two characters that I need (print and print_disabled):
https://github.com/jossef/material-design-icons-iconfont/blob/master/dist/material-design-icons.css
The c# code result is:
The expected result would be:
The text was updated successfully, but these errors were encountered: