cancel
Showing results for 
Search instead for 
Did you mean: 

tnum support for fonts such as Arial

I like my digits to be monospaced so they don't dance, but I want letters to be proportional. I want to use 1 font for this. There are fonts that support this. These are called tabular fonts. They have monospaced digits and support figure space (0x2007) for alignment.
There are fonts that support this that are also available in TouchGFX Designer:

  • Segoe UI
  • calibri
  • Tahoma

This works. I wrote some code that replaces leading spaces before digits with digit spaces if the font supports it. This works really well and numbers no longer dance. Alternatively you can right-align a text field. But then you cannot have any text before it or you have to split the text in parts (so printf is not possible anymore and you might as well use two different fonts).
Another way is to modify a font (make digits same width and remove kerning for digits, and add figure space). I've done this, but this is a lot of work.

There are other fonts that also have tabular digits as an option via "tnum" (Tabular Figures) such as Arial. Example of such a font:

unsigned_char_array_0-1766157515062.png

Is there a way to enable it for Arial in TouchGFX? If not will be be supported in the future?

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
0 REPLIES 0