2025-12-19 7:30 AM - edited 2025-12-19 7:31 AM
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:
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:
Is there a way to enable it for Arial in TouchGFX? If not will be be supported in the future?