I have two applications that use the same data to create a UI, one is using WPF and the other is using GDI. I'm using a font called Myriad Condensed Web
, according to the font name attribute in Windows. I have no problem instantiating the System.Drawing.FontFamily
object using the given font name. However, when I create this font using WPF's System.Windows.Media.FontFamily
, I can only do it using the name Myriad Web
. I can't find a reference to this value anywhere in the font properties within Window's fonts control panel. When I inspect System.Windows.Media.Fonts.SystemFontFamilies
, Myriad Web
is the value of the Source attribute.
So my question is, where is WPF getting this value from? And why is it different to the value GDI is giving? And how can I instantiate the same font for both GDI and WPF using one font name? I want to avoid storing two values - one for GDI and one for WPF.