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

generated new regular.rs file using the font version of v3.2.1 and bump self version to v0.1.4 #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

CtByte
Copy link

@CtByte CtByte commented Jun 12, 2024

@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.

@bernsteining
Copy link
Owner

Really good idea, thanks for pointing that out.

Shouldn't we add the:

  • alphabetical sort
  • duplicates removal
  • renaming

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 fonts/nerdfonts_regular.ttf file, as it is used by src/variants/mod.rs ?

@CtByte
Copy link
Author

CtByte commented Jun 13, 2024

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.

@CtByte
Copy link
Author

CtByte commented Jun 14, 2024

I found a few more changes I would like to add soon to the script

@CtByte
Copy link
Author

CtByte commented Jun 14, 2024

@bernsteining I added the following to the script:

  • alphabetical sort
  • duplicates removal
  • renaming name duplicates
  • renaming most of the UNI* symbol names with a fitting name from the cheet-sheet

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.
If you know how, I can add that to the script, else I think that the rest is up to you now 😄

@CtByte
Copy link
Author

CtByte commented Jun 25, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants