I am looking to create an iOS app (Ejecta or CocoonJS) that dynamically loads questions and displays superscript, subscript, and the special characters theta and the degree symbol.
My proposed solution using sprite fonts is this:
1. Parse the text word by word.
2. For every word, create a sprite font object.
3. Position each sprite font object to the right of the previous object, or if at the end of a line, wrap to the next line.
4. Determine if that word is supposed to be superscripted/subscripted. If so, adjust the line height up/down an appropriate number of pixels.
5. Continue until all the text is parsed.
Does anyone have any experience trying to use spritefonts or the text object to do superscripts/subscripts?
Is it possible to load the degree symbol or the theta symbol with sprite fonts?
Am I missing something obvious?
Develop games in your browser. Powerful, performant & highly capable.