How to add Superscript text in c#.Net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SEhtesham
    New Member
    • Aug 2011
    • 45

    How to add Superscript text in c#.Net

    hi,
    i want to add some static text in my C#.Net code.But i want some text to be subScript and some to be SuperScript..
    Please guide how can i do this?
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    I don't believe you can do this automatically in C# with any kind of font setting... which is too bad actually. I'm quite surprised after 4+ versions of .Net they haven't thought to do this. Anyway, I think you'd have to make your own custom text drawing system and draw it yourself. The Graphics.DrawSt ring method will let you draw text, then you can specify position and size.

    How generic or specialized this is would be entirely up to you, as well as your application.

    Comment

    Working...