Alex Rivera | Logout

Fill ComboBox with List of available Fonts

Asked 2010-08-06T17:14:28.860
49

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

Edit
Report

1 Answer

71

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
answered 2010-08-06T17:20:05.210

Your Answer