Repository navigation
Fast fonts - #2392
Fast fonts#2392mark9064 wants to merge 3 commits into
Conversation
|
Build checks have not completed. Possible reasons for this are:
|
|
Very nice! I am indeed interested in this :) I'll put this PR on the list of stuff I wanna tackle once I've got the free time again. |
|
Looks like CI won't work as it depends on the updated container. I promise it builds :P (The build requires pyelftools now, but the current build container doesn't have it) |
1e6f55c to
f264d26
Compare
|
Numerals exposed an issue with the kerning support missing a FixPointer call Also it was a good time to handle memory allocation failure gracefully. Now a fallback font will be loaded instead (the small system font) so information is still visible (though probably smaller than intended). This avoids font corruption or crashes that are currently seen when LVGL faces low memory |
Requires #2372, #2391
Closes #2197, #2132
@tituscmd you might be interested in trying this :)
This works by compiling the fonts separately at compile time. The data sections (i.e. the structs) are pulled out and serialised to a file, and all the internal pointers are set to their offsets within the file. This makes loading the font extremely easy: allocate a block of memory the size of the file, copy the entire file to that memory, and then fix the pointers inside by adding the address of the memory to all of them. This allows fonts to be loaded with minimal overhead.