Esempio n. 1
0
 public static string FindFontFile(FontFamily fontFamily)
 {
     return(!fontFamily.Source.StartsWith("file:///") ? Enumerable.FirstOrDefault <string>((IEnumerable <string>)Directory.GetFiles(FontUtil.FontsPath), (Func <string, bool>)(file => Enumerable.FirstOrDefault <FontFamily>((IEnumerable <FontFamily>)Fonts.GetFontFamilies(file), (Func <FontFamily, bool>)(o => FontUtil.GetName(o) == FontUtil.GetName(fontFamily))) != null)) : fontFamily.Source.Substring("file:///".Length, fontFamily.Source.LastIndexOf('#') - "file:///".Length).Replace('/', '\\'));
 }
Esempio n. 2
0
 public static string GetFile(this FontFamily fontFamily)
 {
     return(FontUtil.FindFontFile(fontFamily));
 }