If you are developing some editors is .Net, you have to list all the Fonts in you system in a Font Combo. Here is a simple code snippet which will display all the Windows Font in a Dropdown list.
For Each MyFont As FontFamily In System.Drawing.FontFamily.Families Dropdownlist.Items.Add(MyFont.Name) Next
It is in C#
foreach (FontFamily item in System.Drawing.FontFamily.Families)
{
this.comboBox1.Items.Add(item.Name);
}
Here is an Update. You can render the Dropdown such way that is will display all the font name, in the Font.
ComboBox lst = (ComboBox)sender; e.DrawBackground(); Font font = new Font(lst.Items[e.Index].ToString(), 12); e.Graphics.DrawString(lst.Items[e.Index].ToString(), font, Brushes.Black, e.Bounds, StringFormat.GenericDefault); e.DrawFocusRectangle();
You need to write this code in the DrawItem event of the Combo box. Also you need to change the DrawMode property of the Combo box.