trip5 / Matrix-Fonts

Fonts For Use with LED Matrix Clocks
MIT License
33 stars 4 forks source link

Unicode characters #3

Closed lubeda closed 1 year ago

lubeda commented 1 year ago

Hi, I'm trying to implement an automatic translation of these special characters:

¨ → Bitcoin
¸ → Ethereum
¬ → Degree C
¯ → Degree F
¼ → Euro
½ → Won
¾ → Hryvnia

Can you provide the right side of your list? E.g. "€" instead of Euro, to use the correct UTF codes for the original characters.

trip5 commented 1 year ago

Hey lubeda, I'm not sure what you mean by the "right side". I used Fontforge, saving them as SFD files and attempts to get ESPHome/EspHoMaTriXto recognize any Unicode characters resulted in some double-byte error... ie two characters (not the one intended) would be displayed on the matrix clock.

I do still have the full SFD folders for all of the "8" fonts... but there may be more than the 3 unfixed characters... At some point after destroying the higher Unicode characters, I just started saving as BDF files. I'm attempting a merge now to bring back the missing characters for all 3 sets. I can't guarantee what's actually there. A lot of empty space, though, I'm sure.

trip5 commented 1 year ago

OK, sorry to have replaced your work to the a/b/s but I pulled up the original SFDIR folders and I must have thought that I could save some space in the BIN by using smaller BDF files. ESPHome already drops characters not specified in "glyphs:" so I might as well just share the full Unicode BDF files.

Thanks for letting me know it was a/b/s that were issues. I checked similar characters in the Unicode set and they seem fine. I've included the SFDIR files if you use Fontforge. You can see the whole character set there.

As for those special characters as above (Euro, Bitcoin, etc) they should be in their usual Unicode spots. Let me know if you encounter anything... I tend to get more motivated if I feel like someone might be waiting for me to get it done! ^^

trip5 commented 1 year ago

I left this open by accident but this lets me notify you @lubeda because this could get interesting: https://github.com/esphome/esphome/pull/5074

Pillow current branch (instead of a static decade-old one) means Unicode characters possible in ESPHome display...? I'll wait a bit until this gets pushed to main branch of ESPHome... maybe 20223.7.1?

trip5 commented 1 year ago

Now I've figured out how to properly implement TTF bitmap files and I'm even working on a Cyrillic character set. How about just removing that section from the yaml completely? It's totally possible to use Unicode characters when using the TTF files.