List of Built-in WPF Fonts

53,412

Solution 1

There is a way simpler way to list all the default fonts.

using System.Windows.Media;
//... 

//Somewhere inside the window's class (e.g. constructor)   
var fontList = Fonts.SystemFontFamilies;

You can also then bind this to a ComboBox like so:

//...Inside of window constructor
this.DataContext = fontList

Here you can find more details: http://vbcity.com/blogs/xtab/archive/2009/11/30/wpf-how-to-list-select-and-apply-fonts.aspx

Solution 2

As @Chris says, the updated reference link of Microsoft Fonts and supported products is this: https://docs.microsoft.com/en-us/typography/font-list/index

Your choice should be based on your target framework version, I'm not sure you can find a 100% safe font...

Share:
53,412
Gergely Orosz
Author by

Gergely Orosz

Product focused software engineer building cool stuff at Skyscanner. Skype alumni and creator of Cocktail Flow. I love mobile & next gen development, previously built Skype for the web, as well as for Xbox One.

Updated on April 07, 2021

Comments

  • Gergely Orosz
    Gergely Orosz about 3 years

    I'm looking for the list of "safe" font families to use in a WPF application - font families that should be installed on all clients machines capable of running WPF. Silverlight has a well defined list of such (listed on MSDN it comes with 25 fonts such as Arial, Arial Black, Calibri etc).

    Is there such a list for WPF or will I have to embed custom fonts to make sure all users of the application will see the same font type?

  • Rye bread
    Rye bread about 3 years
    I don't have half of these fonts installed, not sure what that list is good for..?
  • MAXE
    MAXE about 3 years
    @Rugbrød I guess it' pretty normal to not have many of them, it depends from your O.S.; take a look to this page: docs.microsoft.com/en-us/typography