protectwise / troika

A JavaScript framework for interactive 3D and 2D visualizations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to input superscripts and subscripts

yywf77 opened this issue · comments

commented

As mentioned in the question, how to input superscripts and subscripts in Text?Thank you!

There's not a great way currently.

If your particular sub/superscript characters are those covered as unique Unicode characters, you could use a font that contains those. (Soon there will be default fallback fonts that cover them automatically.)

If you're wanting to sub/super arbitrary characters like HTML's <sup> and <sub>, that would have to be added as a feature.

I'm having issues finding a font that covers those unique Unicode characters. Any suggestions?

My issue was that I wasn't setting my text.font property to the font with the unicode characters.. I managed to solve the issue now. But it would be nice to have some sort of super/subscript capability!