2020-08-27 06:39 AM
Is there any easy way to use superscript or subscript in TouchGFX, or need to do custom implementation for it?
I need subscripts in particular, which can appear in arbitrary numbers in middle of text fields.
Maybe I can convert unicode characters to their subscript equivalent character, between 0x2000-0x2084 range.
I will post solution here if I figure this out.
Solved! Go to Solution.
2020-08-31 06:53 AM
Sure, that's true. I was answering your question "Is there any easy way to use superscript or subscript in TouchGFX?". Indicating that TouchGFX simply uses Unicodes implies that you need your font to support those sub/super-scripts. Either by manual labor or otherwise.
We sometimes use FontForge here to manipulate fonts. You can even use the reserved areas of a font for whatever you want.
/Martin
2020-08-27 11:53 PM
Super- and subscripts have dedicated unicodes, so they'll be in your font. It's no different than typing "ABC".
2020-08-31 12:01 AM
Unfortunately the Unicode table is missing many subscript characters...
https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts
How would one write subscript b or c for example?
2020-08-31 06:53 AM
Sure, that's true. I was answering your question "Is there any easy way to use superscript or subscript in TouchGFX?". Indicating that TouchGFX simply uses Unicodes implies that you need your font to support those sub/super-scripts. Either by manual labor or otherwise.
We sometimes use FontForge here to manipulate fonts. You can even use the reserved areas of a font for whatever you want.
/Martin