ArtOfWords.Views.Main.MainWindowView.DoesFontExist C# (CSharp) Method

DoesFontExist() public method

public DoesFontExist ( FontFamily fontFamily ) : bool
fontFamily FontFamily
return bool
        public bool DoesFontExist(FontFamily fontFamily)
        {
            if (fontFamily == null)
            {
                return false;
            }

            foreach (var f in System.Windows.Media.Fonts.SystemFontFamilies)
            {
                if (f.Source.Equals(fontFamily.Source))
                {
                    return true;
                }
            }
            return false;
        }