From: Stefan Csomor Date: Sun, 7 Nov 2010 11:54:09 +0000 (+0000) Subject: disable code because of OS bug, fixes #12478, fixes #12554 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2d64bab7032e60cd07959abd0a7dd968f6b75778 disable code because of OS bug, fixes #12478, fixes #12554 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/carbon/utilscocoa.mm b/src/osx/carbon/utilscocoa.mm index ae7df72070..49fc2247d0 100644 --- a/src/osx/carbon/utilscocoa.mm +++ b/src/osx/carbon/utilscocoa.mm @@ -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; }