2019-12-11 01:33 AM
Hi there
Is there a way to have one ID with different Fonts?
I don't see the point in generating the same string multiple times with different fonts. That is event cumbersome with the translation offices who have to translate the same string multiple times.
We use a lot of the same strings in different places in the GUI.
For example I get a String ID from a TCP/PI packet and want to display it on the screen.
The sender of the packet does not care which font / typography is used, but I do, so with our old GUI library I could do something like "show_text(TEXT_ID, FONT_A_30px)"
How can I do that with TouchGFX? Is there a workaround?
Thanks,
jimmii
Solved! Go to Solution.
2022-05-29 10:58 PM
Hi Jimmi,
Thanks for the reply can you guide me as to how can I get the function created the custom one
TEXTS GetText(TEXTS baseId, touchgfx::FontId FONT) {
return TEXTS(baseId + FONT);
when copying this as it is it cant perform TEXTS show error
2022-05-29 11:49 PM
You have to include:
#include <touchgfx\Texts.hpp>
#include <texts\TextKeysAndLanguages.hpp>