Esempio n. 1
0
        internal static FontFamilyInternal GetOrCreateFromWpf(WpfFontFamily wpfFontFamily)
        {
            FontFamilyInternal fontFamily = new FontFamilyInternal(wpfFontFamily);

            fontFamily = FontFamilyCache.CacheOrGetFontFamily(fontFamily);
            return(fontFamily);
        }
Esempio n. 2
0
 internal static FontFamilyInternal GetOrCreateFromGdi(GdiFontFamily gdiFontFamily)
 {
     try
     {
         Lock.EnterFontFactory();
         FontFamilyInternal fontFamily = new FontFamilyInternal(gdiFontFamily);
         fontFamily = FontFamilyCache.CacheOrGetFontFamily(fontFamily);
         return(fontFamily);
     }
     finally { Lock.ExitFontFactory(); }
 }
Esempio n. 3
0
 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(); }
 }