Sometimes, you may need to change fonts at runtime. While it is potentially easier to have 2 Text I/Os in 2 cards of a Deck (1 of each font), there is also a way to change a font via code.
If you want to change fonts via code, you can use altiaSetFont (then send the UNIX font string) in this manner:
/* Set object ID of the text object to update */
altiaSendEvent("altiaSetObj", <object_id_number>); //the obj ID is in parenthesis in the Altia Design navigator
/* Set font type */
You can find a UNIX font string as shown in the image below:
Link to image as well: https://altia.zendesk.com/attachments/token/gGQ5He8PknDc5C1m0Y4eLKuwP/?name=inline641943226837.png
NOTE: For the builtin animation "altiaSetFont" make sure to follow all the rules (refer to the Altia User's Guide for details on Built-In Animations, and sections 3.9.3 and 3.9.4 for these special animations).
Specifically, the font must exist in your design in order for it to be accessible on the target hardware. In addition the "Dynamic Built-in Animations" option must be checked at code generation time in the Code Generation Options dialog.
NOTE: As an alternative, you can use the Skin object instead to change fonts at runtime. Please see the KB linked below to explore that option: