-
Notifications
You must be signed in to change notification settings - Fork 12
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
Put the font data in the const area #14
Comments
The egregious use of RAM for fonts was the primary reason I abandoned TinyGo for my e-paper clock. I had plenty of flash, but almost no RAM. The Arduino libraries solved this problem (although I was forced to switch to C++). |
Hi @timboldt Sometimes LLVM will store data in ROM without using a const font, But even in that case, the build time is very long, as described in #22. The method described in this issue has the following advantages:
I'll try to make a PR somewhere this week. |
This looks like the perfect answer to the main issues I had with fonts: long build times, and excess RAM usage. |
For example, fonts created with tinyfontgen-ttf are created in const. |
The current dev branch code has font data in RAM.
This makes it very RAM intensive.
This issue shows how to put the font data in const, which will be done in the future.
It will also allow you to put it in spi flash afterwards.
I plan to put out a PR once I get my code together.
The PR will replace all existing fonts.
before:
after:
The text was updated successfully, but these errors were encountered: