Extracts the list of fonts available on your system, using C#
/// <summary>
/// Extracts the list of fonts available on your system
/// </summary>
private void GetInstalledFontCollection()
{
StringBuilder sbFonts = new StringBuilder();
System.Drawing.Text.InstalledFontCollection ifc = new System.Drawing.Text.InstalledFontCollection();
System.Drawing.FontFamily[] ff = ifc.Families;
foreach (System.Drawing.FontFamily family in ff)
{
if (family.IsStyleAvailable(System.Drawing.FontStyle.Regular))
{
System.Drawing.Font f = new System.Drawing.Font(family.Name, 12);
sbFonts.AppendLine(f.Name);
f.Dispose();
}
}
// Insert the list of fonts available on your system, in a TextBox
TextFonts.Text = sbFonts.ToString();
}