cancel
Showing results for 
Search instead for 
Did you mean: 

Using superscript or subscript in TouchGFX?

Tuoman
Senior II

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.

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

3 REPLIES 3
Martin KJELDSEN
Chief III

Super- and subscripts have dedicated unicodes, so they'll be in your font. It's no different than typing "ABC".

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?

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