示例#1
0
        internal static FontFamilyInternal GetOrCreateFromWpf(WpfFontFamily wpfFontFamily)
        {
            FontFamilyInternal fontFamily = new FontFamilyInternal(wpfFontFamily);

            fontFamily = FontFamilyCache.CacheOrGetFontFamily(fontFamily);
            return(fontFamily);
        }
示例#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(); }
 }
示例#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(); }
 }