MCU: Add support for font rendering from TrueType fonts loaded from memory #4250
Labels
a:text
Text rendering, fonts, Text input (mS,bF)
enhancement
New feature or request
rfc
Request for comments: proposals for changes
A few times in the past the desire has come up to be able to support a wider range of languages with Slint on MCUs, without pre-rendering a large amount of glyphs ahead of time or embedding an entire TrueType font in regular flash space (most recently in #4149 ).
We could add a feature among the following lines to address this:
slint/sdcard-fonts
feature that enables dependencies to embedded_sdmmc and fat32 (or similar crates).ttf
file on an SD card (if inserted), read the cmap/hmtx/os2/etc. tables to cache basic font metrics, and then on a per-glyph basis cache glyph metrics and renderered glyphs on the heap on-demand.On MCUs that are equipped with enough RAM, like an STM32H7 for example, this might be a reasonable solution to better support multiple languages.
In the same context, it might make sense to add the ability to load translations off of the same SD-Card - see also #3715
The text was updated successfully, but these errors were encountered: