List all machine's font names

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi experts

How can I retrieve the list of all font names currently installed on the
running machine ?

Thanks in advance.

Dotnetjunky
 
Hi,
Check out System.Drawing.Text.InstalledFontCollection

Hi experts

How can I retrieve the list of all font names currently installed on the
running machine ?

Thanks in advance.

Dotnetjunky
 
Hi,

Here is the piece of code.

private void getSystemFontCollection(ComboBox systemFonts)
{
try
{
InstalledFontCollection ifc = new InstalledFontCollection();
FontFamily[] ffs = ifc.Families;

foreach(FontFamily ff in ffs)
{


systemFonts.Items.Add(ff.Name);

}
}
catch(Exception msg)
{
MessageBox.Show(msg.Message, "Failed to load the system fonts",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}

}

Thanks
Raghavendra
 
Back
Top