Integrating TrueType font support (I have the code, are you interested?) #2020
Replies: 4 comments 3 replies
-
Thanks for the offer. At the moment quite a few different font formats are supported and I am reluctant to add anything new, but I will add to the potential enhancement list. |
Beta Was this translation helpful? Give feedback.
-
This may be of interest. There is a library here: |
Beta Was this translation helpful? Give feedback.
-
If your TTF rendering code could be incorporated into an independant library like OpenFontRender with TFT_eSPI compatible examples then it would be an interesting addition. I think your code looks like it will render faster. |
Beta Was this translation helpful? Give feedback.
-
It's possible. Right now I have a 3rd party lib I created for LVGL that uses it. I contributed to that project, but I'm sure I could adapt it. |
Beta Was this translation helpful? Give feedback.
-
I recently attempted to integrate my Tiny_TTF library into LVGL. It's integrated pending some build script issues on their end that they can't solve so I've closed the pull request. I'm a bit frustrated by it, but I ramble.
Anyway, days of effort are currently in question because of it, but I figured when life gives you lemons, make lemonade.
Point is I've ported this https://github.com/nothings/stb/blob/master/stb_truetype.h to work in low memory environments by streaming everything, and tweaking the heap scheme a little bit.
It's tested well enough that I use it in htcw_gfx.
Before I go through the effort of integrating, I was wondering if you're even interested in incorporating it.
Here's my code. It's a header only C library which serves as its own source file so it's easy to incorporate as a private header
You would include it in TFT_eSPI.cpp or similar, maybe it's own translation unit, it's really up to you. https://github.com/codewitch-honey-crisis/stb/blob/master/stb_truetype.h
Beta Was this translation helpful? Give feedback.
All reactions