tchapi / Adafruit-GFX-Font-Customiser

A little utility to customise pixel fonts for the Adafruit GFX library
https://tchapi.github.io/Adafruit-GFX-Font-Customiser/
MIT License
90 stars 47 forks source link

Add the ability to add characters to the set #17

Closed tchapi closed 3 years ago

tchapi commented 3 years ago

This PR allows the addition of characters at the start or at the end of the set, automatically adding the interval characters in between so the glyphs table is contiguous

charno commented 3 years ago

@tchapi

Wow, what a beautiful solution! Much better than my hacky PR! It works form me, and I love that the "Last glyph to export" is automatically updated. Thanks!

Some suggestions / questions:

Again, thanks a lot for your work. I thought I would do some small, a bit hacky drive-by commit for a corner use case and did not expect to see this properly implemented! :-)

tchapi commented 3 years ago

Your suggestions are great ! I've updated a few things — can you have a look ?

charno commented 3 years ago

Thanks a lot, that was quick!

I noticed some more things:

Just a thought, and clearly out of scope: How far away from not having a "customizer" but an "editor" where you can create new fonts is this project after these changes? Maybe it's only a dialog to enter font name and first character which initializes the data structures?

charno commented 3 years ago

Please have a look at https://github.com/tchapi/Adafruit-GFX-Font-Customiser/pull/18, i added some fixes for the problems I described above.

tchapi commented 3 years ago

This is fantastic. Thanks so much for your help on this !

charno commented 3 years ago

Thank you for providing this very useful tool! If I find the time I might add some button to create a new, empty font. What do you think about that? Would you be interested in including this feature? With this, this tool would be a full editor which could also be used to create new fonts.

tchapi commented 3 years ago

I'm all for it. I think we might need to revamp the JS a bit then, it may become a bit cumbersome otherwise.

tchapi commented 3 years ago

PS: I added your handle to https://github.com/tchapi/Adafruit-GFX-Font-Customiser as a contributor. Tell me if you wish to remove this

charno commented 3 years ago

Thanks for the merge and for adding me as a contributor! :-)