Skip to main content
awiernie
Associate III
June 20, 2022
Solved

Memory requirement of several typographies wich identical font settings

  • June 20, 2022
  • 2 replies
  • 797 views

Currently I use only a few typographies because I thought that each typography stores its characters as graphics. Instead of using one typgraphy on many places, I could also use one typography for menus, one for page headers, one for buttons etc. What happens if I use e.g. 3 typographies with identical settings (font, font size, etc.) - Is each image stored only once (as the font and size is the same) or is it stored 3fold (because there are 3 typographies, indepenently if the fonts are identical or not)? If it does not rrequired additional memory, it would be nice to use seperate typographies for seperate things.

This topic has been closed for replies.
Best answer by Yoann KLEIN

Hello @awiernie​ ,

If you use 3 identical typographies, it will be stored only once in the generated/fonts folder. But, if you modify a parameter of one of these typos (ex: Font size, font family, ...), new files will be generated in generated/fonts and generated/fonts/src folders.

The similar process is applied to texts. If you create several TextAreas in your application, and if you use the exact same string many times (Ex : "Hello World" and "Hi World"), then this particular string will be stored only once in the generated/texts/src/Texts.cpp file.

Hope that this helped,

/Yoann

2 replies

Yoann KLEIN
Yoann KLEINBest answer
ST Employee
June 21, 2022

Hello @awiernie​ ,

If you use 3 identical typographies, it will be stored only once in the generated/fonts folder. But, if you modify a parameter of one of these typos (ex: Font size, font family, ...), new files will be generated in generated/fonts and generated/fonts/src folders.

The similar process is applied to texts. If you create several TextAreas in your application, and if you use the exact same string many times (Ex : "Hello World" and "Hi World"), then this particular string will be stored only once in the generated/texts/src/Texts.cpp file.

Hope that this helped,

/Yoann

Yoann KLEINST Software Developer | TouchGFX
awiernie
awiernieAuthor
Associate III
June 21, 2022

OK, this is exact what I need.