ARCed.Helpers.FontHelper.IsInstalled C# (CSharp) Method

IsInstalled() public static method

Checks if a font is installed on the machine and returns the result
public static IsInstalled ( string fontName ) : bool
fontName string The names of the font to check for
return bool
        public static bool IsInstalled(string fontName)
        {
            using (var testFont = new Font(fontName, 8))
            {
                return 0 == string.Compare(
                  fontName,
                  testFont.Name,
                  StringComparison.InvariantCultureIgnoreCase);
            }
        }