Setting Fonts in WPF

Fonts Setting fonts used to be a bit painful but I’ve found it quite easy in WPF.  In my project I’ve copied the font files into a directory structure: \Resources\Fonts and I have a font file masanreg.ttf which contains the font called MasonSansRegular.

To use the font in Xaml if just reference the path to the font and the font name prefixed with a # e.g.



You can also see the list in Blend under the Text section


Technorati Tags: ,