3
<TextBlock Foreground="Black" FontSize="50" FontFamily="Segoe UI">
    <Run>Normal Text</Run>
    <Run Typography.Variants="Superscript" Text="Superscript123"/>
    <Run Typography.Variants="Subscript" Text="Subscript123"/>
</TextBlock>

Below is my screen shot. It seems that certain characters are not allowed in super/sub script. enter image description here

Actually I want to put a ® symbol what I'm getting is

enter image description here

and what I want is

enter image description here

P.S. I found this answer https://stackoverflow.com/a/3435675/468724 but there is no such property as BaselineAlignment

Community
  • 1
  • 1
Inder Kumar Rathore
  • 39,458
  • 17
  • 135
  • 184
  • it will depend on the font used as to what variants are supported - Palatino Linotype supports all the letters for instance. If you use FontFamily=Segoe WP for the registration mark you'll get the desired behavior, but I'm not sure if you can/want to rely on Segoe WP being on the device. – Jim O'Neil Feb 19 '13 at 07:14
  • @JimO'Neil Yeah that I got that it depends upon font family. But what about baseline property??? – Inder Kumar Rathore Feb 19 '13 at 07:39
  • The other question was related to WPF. WPF is a granddad of WinRT/XAML present in Windows 8 and used for Windows Store Apps. – Filip Skakun Feb 19 '13 at 08:11
  • @FilipSkakun yeah you are right but is there any property/solution to this? – Inder Kumar Rathore Feb 19 '13 at 09:18

2 Answers2

2

Either use Segoe WP font

Or can do like this

<StackPanel Orientation="Horizontal">
    <TextBlock FontFamily="Segoe UI" FontSize="16" Text"Normal Text"/>
    <TextBlock FontFamily="Segoe UI" FontSize="9" Text="&#174;"/>
</StackPanel>

I used 60% lesser font for trademark symbol

Inder Kumar Rathore
  • 39,458
  • 17
  • 135
  • 184
0

This looks nice for a subscsript Run in a TextBlock on my screen, using VS2015:

<Style TargetType="{x:Type Run}" x:Key="Sub">
    <Setter Property="FontSize" Value="10"/>        
    <Setter Property="BaselineAlignment" Value="TextBottom"/>
</Style>

It's just a bit lower than Typography.Variants = Subscript, which seems to use just a smaller font

Erik
  • 894
  • 1
  • 8
  • 25