]> git.saurik.com Git - wxWidgets.git/commitdiff
disable code because of OS bug, fixes #12478, fixes #12554
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 7 Nov 2010 11:54:09 +0000 (11:54 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 7 Nov 2010 11:54:09 +0000 (11:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/carbon/utilscocoa.mm

index ae7df72070e87cbe758a977bfce6d301c5f0dead..49fc2247d066943a578cbb173037f6bd6b11986a 100644 (file)
@@ -244,7 +244,11 @@ WX_NSFont wxFont::OSXCreateNSFont(const wxNativeFontInfo* info)
                     remainingTraits &= ~NSBoldFontMask;
                 }
             }
-            if ( remainingTraits & NSItalicFontMask)
+            // the code below causes crashes, because fontDescriptorWithMatrix is not returning a valid font descriptor
+            // it adds a NSCTFontMatrixAttribute as well which cannot be disposed of correctly by the autorelease pool
+            // so at the moment we have to disable this and cannot synthesize italic fonts if they are not available on the system
+#if 0
+            if ( remainingTraits & NSItalicFontMask )
             {
                 if ( nsFontWithTraits == nil )
                     nsFontWithTraits = nsFont;
@@ -260,6 +264,7 @@ WX_NSFont wxFont::OSXCreateNSFont(const wxNativeFontInfo* info)
                         nsFontWithTraits = f;
                 }
             }
+#endif
             if ( nsFontWithTraits != nil )
                 nsFont = nsFontWithTraits;
         }