2023-09-07 05:57 AM
We want to change the font and color of text fields at runtime. The text always remains the same. We only want to change to one of the predefined fonts.
Is this possible with TouchGFX?
Thank you for any advice.
Regards, Roger
Solved! Go to Solution.
2023-09-11 05:29 AM
Hello @Roger.ch ,
Changing the color is possible, you will find in the tutorial 6 on our support website, a guide to change it step by step.
Concerning the font, it's not as easy as the color. In TouchGFX, all texts are associated with a certain typography. That means that if you need to change the font for a certain text in your application, you'll need to duplicate your text in the text database and change the font. So you'll have 2 resources with the same text but with different typographies.
Changing the font runtime would also imply that in your code you'll need to change the text resource to show on your screen.
2023-09-11 05:29 AM
Hello @Roger.ch ,
Changing the color is possible, you will find in the tutorial 6 on our support website, a guide to change it step by step.
Concerning the font, it's not as easy as the color. In TouchGFX, all texts are associated with a certain typography. That means that if you need to change the font for a certain text in your application, you'll need to duplicate your text in the text database and change the font. So you'll have 2 resources with the same text but with different typographies.
Changing the font runtime would also imply that in your code you'll need to change the text resource to show on your screen.
2023-09-11 05:56 AM
Hi Osman.
Thank you for your answer. I know this from earlier applications with graphics processors. There I also had to write a character set generator for the characters used. Would have hoped that TouchGFX could specify two or more fonts per text. Many designers would like to highlight the same text with a different font.
Please put it on the "Nice to have" feature list.
Thanks.
Regards, Roger
2023-09-12 01:21 AM
Thank you for your feedback!