Determine if font is insalled

  • Thread starter Thread starter Jared Crystal
  • Start date Start date
J

Jared Crystal

I am using NET20 and need to determine if font is installed on users
machine?

TIA
 
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;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top