Skip to main content
DSwea.1
Associate III
April 29, 2022
Question

How to enter non-typeable unicode characters in typography wildcard characters

  • April 29, 2022
  • 2 replies
  • 1847 views

How can I enter unicode non-ASCII characters (ex.: Ballot Box (U+2610) and Ballot Box Checked (U+2611)) in typography wildcards, and/or in single-use strings?

This topic has been closed for replies.

2 replies

Yoann KLEIN
ST Employee
May 3, 2022

Hello @DSwea.1​ ,

You have first to check if the character you want to display is included in the font you are using :

  • Go to your TouchGFX project, then generated>fonts>src, and then open the file corresponding to your font (e.g. Font_***_XX_XXbpp.cpp).
  • In this file, you will see the framebuffer data for each character supported by this font. So, if you cannot find your character in this file, it means that it's not supported by this font. Another way to check if it's supported or not is to simply generate code in TouchGFXDesigner. If the character is not recognized, it will prompt a warning message in the log window.

0693W00000Np2qhQAB.png 

So, if you character doesn't exist in the font, you will have to find another font that provides what you want, and include it in TouchGFXDesigner, by copying the .ttf file in the TouchGFX>assets>fonts folder. Then, restart TouchGFXDesigner and select your new font. For instance, Arial Unicode MS font works for Ballot Box characters.

Let me know if that helped you,

/Yoann

Yoann KLEINST Software Developer | TouchGFX
wired
Senior II
May 3, 2022

There is also some information in this post. See my answer at the end for an easy way to do this on a laptop computer.