Fill ComboBox with List of available Fonts

Moon picture Moon · Aug 6, 2010 · Viewed 44.3k times · Source

How can I fill a combo-box with a list of all the available fonts in the system?

Answer

Zach Johnson picture Zach Johnson · Aug 6, 2010

You can use System.Drawing.FontFamily.Families to get the available fonts.

List<string> fonts = new List<string>();

foreach (FontFamily font in System.Drawing.FontFamily.Families)
{
    fonts.Add(font.Name);
}

// add the fonts to your ComboBox here