Skip to content

Conversation

@mark9064
Copy link
Member

Requires #2372, #2391

  • Fonts load much faster. With LittleFS upgrade + fixes #2330, the G7710 watchface should load in about 30ms versus the current 250-400ms (10x speedup)
    • Basically it is no longer noticeable whether fonts are on the external flash or not
  • Fonts use less memory when loaded as they are in one large allocation
  • Saves ~2K flash size (LVGL font loader eliminated)
  • Fonts changed to use smart pointers so they deallocate themselves

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.

@mark9064 mark9064 added enhancement Enhancement to an existing app/feature external flash labels Dec 16, 2025
@github-actions
Copy link

Build checks have not completed. Possible reasons for this are:

  1. The checks need to be approved by a maintainer
  2. The branch has conflicts
  3. The firmware build has failed

@tituscmd
Copy link
Contributor

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.
When that time comes, I'll report whatever I can!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement to an existing app/feature external flash

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy in-use resources from SPI flash to built-in flash

2 participants