Skip to main content
GMeur
Associate III
July 26, 2022
Solved

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

  • July 26, 2022
  • 1 reply
  • 1240 views

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.

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

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

1 reply

Yoann KLEIN
Yoann KLEINBest answer
ST Employee
August 8, 2022

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 KLEINST Software Developer | TouchGFX