Problem
For scientific apps, the ability to display subscripts(and possibly superscripts) is a must. The strings using these characters could be used in, for example, Labels or within text drawn in a Canvas.
Proposed Solution
Add a String subclass that allows modification of ranges of characters to have additional attributes like subscript, superscript and color. See macOS and iOS AttributedString class for an example of how this could work.
Controls using this type of String would need minor modification. For example, Labels would need another property for this type of string, and Graphics.drawText() would need an overwritten method that accepted this type of string.
Example Workflow
Var myText As AttributedString = “x1” // First set text content
myText.setAttribute(1,1, TextAttributes.subscript) // Set range of subscripted characters, in this case starting and ending at index 1 assuming a 0-based array of characters
Who Would This Help?
Anybody developing scientific apps.