While looking at some official Windows8/"Metro" material, I see this line of xaml:
<TextBlock Text="Contoso Cookbook" FontFamily="Segoe UI" FontWeight="SemiLight" FontSize="26.667" />
What?!? A font size of 26.667? I realize this is 2/3rds of 40, and 5/6ths of 32, so maybe there's some conversion thing happening there, but is this going to be the preferred way of setting font sizes, and if so, what are the guidelines for coming up with these seemingly random sizes?
There are pre-defined Windows 8 styles, located in your project in Common\StandardStyles.xaml
. Take those as the standard.
The size you are talking about belongs to SubheaderTextStyle
.
Here is why you get the "weird" size. If you look at the typography guidelines, you see the values in points. However, in XAML you specify the font size in pixels. Sample to go with: 96 PPI (pixel-per-inch) display. In 1 inch, you get 72 points. Doing simple math:
96 pixels per inch / 72 points per inch = 1.(3) pixels/point
So, 26.667 / 1.(3) ~ 20pt
This way, you are getting a consistent font size.