Change Font
Is there any way to change font of an application? I have a button that change the application style( buttons image ecc) but i need (graphic guy want) also to change the font, size and colout of the text. Is it that possible?
Is there any way to change font of an application? I have a button that change the application style( buttons image ecc) but i need (graphic guy want) also to change the font, size and colout of the text. Is it that possible?
Hi @Zui,
Yes. If you go the texts tab in TouchGFX designer you'll see that you associate specific fonts with "typographies". You reference these typographies when you create static texts or wildcard texts. So when you use these text ids in your text areas in code (generated for you based on text definitions) the font which was used to generate the glyphs is implicit.
Take look at the Texts tab in the designer and you should see what i mean.
EDIT: Check out this tutorial step on adding text: https://touchgfx.zendesk.com/hc/en-us/articles/205587571-Step-3-Adding-Text.
The color is changed programatically. TextArea::setColor(colortype). So, you see, fonts are just referenced behind the scenes to tell the fontconverter where to find the glyphs. You will only ever interface with the "names" that you give each text string.
e.g.
myTextArea.setTypedText(TypedText(T_MY_STRING_NAME));/Martin
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.