Skip to main content
Tuoman
Senior II
August 27, 2020
Solved

Using superscript or subscript in TouchGFX?

  • August 27, 2020
  • 3 replies
  • 1091 views

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.

This topic has been closed for replies.
Best answer by Martin KJELDSEN

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

3 replies

Martin KJELDSEN
Principal III
August 28, 2020

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

Tuoman
TuomanAuthor
Senior II
August 31, 2020

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?

Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
August 31, 2020

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