X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d0a7d7b1af1f24c7d1ad223e9a460152403e18dd..c9ed413ab4f5673ffff00198dc6ce1397398bda4:/src/osx/carbon/utilscocoa.mm 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; }