Reputation: 956
The code is pretty much straightforward:
<TextBlock TextAlignment="Center" Text="{Binding TimeAgo}" Foreground="White" FontSize="12" FontFamily="Calibri" Background="Transparent"/>
As far as I know, WPF has native support for Calibri font. However, the font renders differently on XP and on Vista/7:
XP:
Vista:
My main issue is with the font's size (It renders bigger on XP) since I have dedicated, limited space for the text.
I am currently using UseLayoutRounding="True" but removing it didn't make any difference. I'm also using:
<ResourceDictionary Source="/PresentationFramework.Aero, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" />
But removing it also didn't make any difference (In terms of the font's size).
Upvotes: 2
Views: 774
Reputation: 29614
WPF does not have native support for any font, it can only use the fonts installed on the machine.
The bigger text is not Calibri (it looks like Arial or Tahoma to me), you can look at the shape of the "g" to see those are not the same font.
You can only use Calibri on XP if you or another software (like Office 2007 or later) installed it first.
Upvotes: 8