cancel
Showing results for 
Search instead for 
Did you mean: 

Cache all fonts at startup

Dadigno
Associate III

Hi Community,

Is it possible to cache all fonts at the startup of TouchGFX in order to have a single memory access?

The documentation provides an example of caching a single font associated with a text box when a screen starts.  If I understand correctly, this procedure would have to be applied to each screen change and for each text box contained each time.

It would be more useful ( for me ) to have a function like "void Bitmap::cacheAll()" for images.

e.g. "void Font::cacheAll()" to be called in FrontendApplication::FrontandApplication().

 

Regards

 

3 REPLIES 3
LouisB
ST Employee

Hello @Dadigno,

Yes you can put the code anywhere you what, and create all the cached font at in the FrontendApplication, but if you want to use all font then you'll have a large cache, so you also directly use non-cached font in that case.

Regards,

Louis BOUDO
ST Software Developer | TouchGFX

Hi @LouisB ,


Thanks for your support. Could you please provide an example of how to do what you described? I'm not sure which APIs I should use to cache all the fonts.

 

Regards,