internal static FontFamilyInternal GetOrCreateFromWpf(WpfFontFamily wpfFontFamily) { FontFamilyInternal fontFamily = new FontFamilyInternal(wpfFontFamily); fontFamily = FontFamilyCache.CacheOrGetFontFamily(fontFamily); return(fontFamily); }
internal static FontFamilyInternal GetOrCreateFromGdi(GdiFontFamily gdiFontFamily) { try { Lock.EnterFontFactory(); FontFamilyInternal fontFamily = new FontFamilyInternal(gdiFontFamily); fontFamily = FontFamilyCache.CacheOrGetFontFamily(fontFamily); return(fontFamily); } finally { Lock.ExitFontFactory(); } }
internal static FontFamilyInternal GetOrCreateFromName(string familyName, bool createPlatformObject) { try { Lock.EnterFontFactory(); FontFamilyInternal family = FontFamilyCache.GetFamilyByName(familyName); if (family == null) { family = new FontFamilyInternal(familyName, createPlatformObject); family = FontFamilyCache.CacheOrGetFontFamily(family); } return(family); } finally { Lock.ExitFontFactory(); } }