예제 #1
0
        public static string GetFullName(string fontName)
        {
            string foundName = null;

            // First try fullname
            foundName = FontList.FirstOrDefault(item => item == fontName);

            // Then the ful name with flf extension
            if (foundName == null)
            {
                foundName = FontList.FirstOrDefault(item => item.Contains("/" + fontName + ".flf"));
            }

            // Then with flf extension
            if (foundName == null)
            {
                foundName = FontList.FirstOrDefault(item => item.Contains(fontName + ".flf"));
            }

            // Then any match
            if (foundName == null)
            {
                foundName = FontList.FirstOrDefault(item => item.Contains(fontName));
            }

            return(foundName);
        }