2025-12-19 7:30 AM - edited 2026-01-05 5:05 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. And this is not allowed for many fonts (our customer allowed us to do this).
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?
Solved! Go to Solution.
2026-01-21 1:48 AM
I decided to use the IBM Plex Sans font from google fonts. This font meets all our criteria. I used a modified script from @ferro to check if figure space is supported.