-
Notifications
You must be signed in to change notification settings - Fork 9
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
generated new regular.rs file using the font version of v3.2.1 and bump self version to v0.1.4 #4
base: master
Are you sure you want to change the base?
Conversation
Really good idea, thanks for pointing that out. Shouldn't we add the:
to the python script logic? In order not to do it by hand each time nerdfonts gets updated. Also, shouldn't we also update the |
It would be great to automate these tasks for sure. I did not use python much before, but I am confident that it is possible. The renaming could be difficult, as I manually checked the code on the cheet-sheet, but all that can be added to the script like a big "switch-case" and expand on it when new duplicates are found. I missed the font, will fix that, thanks for pointing it out. I will also add the script as a file to the project. I will do what I can as soon as I get the time. |
I found a few more changes I would like to add soon to the script |
@bernsteining I added the following to the script:
One thing I could not figure out is how to generate a UTF-8 file. It ends up being a UTF-16 encoded. I just use Notepad++ to convert to UTF-8. |
@bernsteining No hurry, just want to know if there is anything more you would like me to add and if you have any comments on my changes so far. |
In my opinion the I'd rather prefer a small logic that produces the same output, or a JSON file loaded by the python script. Because adding a new renaming implies adding a new if/else statement and I don't like it :/ Maybe we also can do it all on the rust side at build time of the crate. Gotta find time to check that. :( |
@bernsteining I agree with the hardcoded logic being large. The names that are duplicated could be given an auto-generated name like My real issue is with the ones that are named like elif symbol_name == "UNIE0A0" and code == r"\u{E0A0}": symbol_name = "BRANCH"; https://www.nerdfonts.com/cheat-sheet (search .nf-pl-branch::before {
content: "\e0a0";
} Something could be improved here, but I will wait for your answer. |
@bernsteining I could not resist and I ended up updating the font using the latest version, since you included the python script.
The lines in the
regular.rs
file are ordered alphabetically and I also removed duplicates using Notepad++I removed a few more issues I found when trying to build the project.
The following characters were not replaced when generating the
symbol_name
:(
,)
,.
,/
.There were a few "icons" that had the same symbol_name, but different codes. I renamed them all.