Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fill ComboBox with List of available Fonts

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

like image 903
Moon Avatar asked Aug 06 '10 17:08

Moon


1 Answers

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 
like image 127
Zach Johnson Avatar answered Oct 09 '22 18:10

Zach Johnson