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
This commit is contained in:
Stefan Csomor
2010-11-07 11:54:09 +00:00
parent 32eb560338
commit 2d64bab703

View 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;
}