none
Set superscript and subscript in formatted text in wpf

Answers

  • First you need to select a font that supports them.  One example is Palatino Linotype.  Then set Typography.Variants to Superscript/Subscript.

            <TextBlock FontFamily="Palatino LinoType" FontSize="20">
    		<Run>Before</Run>
       	        <Run Typography.Variants="Subscript">subscript</Run>
    		<Run Typography.Variants="Superscript">superscript</Run>
    		<Run>After</Run>
    	</TextBlock>
    Tuesday, January 19, 2010 5:50 PM

All replies

  • First you need to select a font that supports them.  One example is Palatino Linotype.  Then set Typography.Variants to Superscript/Subscript.

            <TextBlock FontFamily="Palatino LinoType" FontSize="20">
    		<Run>Before</Run>
       	        <Run Typography.Variants="Subscript">subscript</Run>
    		<Run Typography.Variants="Superscript">superscript</Run>
    		<Run>After</Run>
    	</TextBlock>
    Tuesday, January 19, 2010 5:50 PM
  • First you need to select a font that supports them.  One example is Palatino Linotype.
    Hello Ben, how does one find out which fonts support this? Is there a list for this? Thanks!
    Saturday, March 27, 2010 5:01 PM
  • Is the Typography attribute supported in Windows Phone 7? I don't see any way to have sub/superscripted text inside runs with Windows Phone 7, huge boon :(
    Thursday, October 21, 2010 2:23 AM