cancel
Showing results for 
Search instead for 
Did you mean: 

Questions about text management : how can I separate the texts and the fonts in the touchgfx text resources?

GMeur
Senior

Hi,

Imagine I want to write the same string in two screens with a font X, with a font Y in another screen, and with a font Z in three other screens, how should I go about it with the current text management that offers touchgfx? Should I just create various resources like TEXT_1_SMALL, TEXT_1_MEDIUM and TEXT_1_BIG that all have the same text and a different font ? What's the best way to go about it?

What I do as of now is shown in the following image:

0693W00000QMAdBQAX.png 

I just use the resources to define the style of the texts and then, I have a separate table with all the traductions, which allows me to print a same text with various styles. What I don't like is that by doing that, I have to bypass the 'touchgfx way' of managing texts.

So the question is : is there a way of doing that through touchgfx without having to have multiple resources with the same text just because they have different fonts… ?

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Yoann KLEIN
ST Employee

Hello @GMeur​ ,

Unfortunately, I don't think that there is a very good and convenient way to achieve that.

Your solution seems to be the best in that case, but you could improve it a little bit.

For example, you could create only 3 TextAreas with wildcards, and then put your translation texts into those wildcards to display them on the interface.

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX

View solution in original post

1 REPLY 1
Yoann KLEIN
ST Employee

Hello @GMeur​ ,

Unfortunately, I don't think that there is a very good and convenient way to achieve that.

Your solution seems to be the best in that case, but you could improve it a little bit.

For example, you could create only 3 TextAreas with wildcards, and then put your translation texts into those wildcards to display them on the interface.

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX