How to get all font styles from system in c#.net?

binay00713

Broken In
I am implementing a Font Dilouge Box application.
I have created 3 listboxes font family,font style & font size & a text box to dispaly the formated text.
I have done the coding to get all the font families & to apply them in the textbox in the following code:

private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
Font f = new Font(listBox1.SelectedItem.ToString(),24);
textBox1.Font = f;
}

private void Form1_Load(object sender, EventArgs e)
{
InstalledFontCollection ifc = new InstalledFontCollection();
IEnumerator ie;
ie = ifc.Families.GetEnumerator();
while (ie.MoveNext())
{
listBox1.Items.Add(ie.Current.ToString().Substring(18).TrimEnd(']'));
}


But I am not able to get the system font styles & font sizes to the listbox1 & listbox2
please help me.
 
Top Bottom