cancel
Showing results for 
Search instead for 
Did you mean: 

Memory requirement of several typographies wich identical font settings

awiernie
Senior II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Yoann KLEIN
ST Employee

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 KLEIN
ST Software Developer | TouchGFX

View solution in original post

2 REPLIES 2
Yoann KLEIN
ST Employee

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 KLEIN
ST Software Developer | TouchGFX
awiernie
Senior II

OK, this is exact what I need.