Determine if font is insalled

  • Thread starter Thread starter Jared Crystal
  • Start date Start date
I am using NET20 and need to determine if font is installed on users
machine?

TIA

This should do the trick:

using System.Drawing.Text;


public bool fontIsInstalled(string fontName)
{
bool result = false;
InstalledFontCollection installedFontCollection = new
InstalledFontCollection();

foreach (FontFamily family in
installedFontCollection.Families)
{
if (family.Name == fontName)
{
result = true;
break;
}
}

return result;
}
 
Back
Top