Font in WPF application looks different in notepad or any other application
I have otf font called "Houschka Rounded". In notepad, word or any WinF开发者_运维知识库orms app it looks like this:
Code:
<TextBox Text="asdf www w er AAs" FontSize="16" FontFamily="Houschka Rounded" Height="23" HorizontalAlignment="Left" Margin="12,12,0,0" Name="textBox1" VerticalAlignment="Top" Width="317" />
In WPF 4.0 it looks like this:
Anyone know why it's happening?
It turned out that otf font has featureas which can change the look of font. In my case I set ContextualAlternates=false.
<TextBox FontFamily="Houschka Rounded" Height="23" HorizontalAlignment="Left" Margin="12,12,0,0" Name="textBox1" VerticalAlignment="Top" Width="317">
<Run Typography.ContextualAlternates="False" >
asdf www w er AAs
</Run>
</TextBlock>
For details see: http://msdn.microsoft.com/en-us/library/ms745109.aspx
精彩评论