X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/564bf1eab1658512c450f57fc338a5b0c7d1d4cf..04c79127659115628c316cc8f42e7132fd07bb0f:/src/mac/uma.cpp diff --git a/src/mac/uma.cpp b/src/mac/uma.cpp index 219a067bb3..f6bd01f91f 100644 --- a/src/mac/uma.cpp +++ b/src/mac/uma.cpp @@ -104,6 +104,11 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) NavLoad() ; } + long menuMgrAttr ; + Gestalt( gestaltMenuMgrAttr , &menuMgrAttr ) ; + if ( menuMgrAttr & gestaltMenuMgrAquaLayoutMask ) + sUMAHasAquaLayout = true ; + if ( TXNInitTextension != (void*) kUnresolvedCFragSymbolAddress ) { FontFamilyID fontId ; @@ -118,17 +123,21 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) { fontId , (fontSize << 16) ,kTXNDefaultFontStyle, kTXNSystemDefaultEncoding } , } ; int noOfFontDescriptions = sizeof( fontDescriptions ) / sizeof(TXNMacOSPreferredFontDescription) ; -#if TARGET_CARBON +#if 0 // TARGET_CARBON --noOfFontDescriptions ; #endif // kTXNAlwaysUseQuickDrawTextMask might be desirable because of speed increases but it crashes the app under OS X upon key stroke - TXNInitTextension(fontDescriptions, noOfFontDescriptions, ( kTXNWantMoviesMask | kTXNWantSoundMask | kTXNWantGraphicsMask)); - } + OptionBits options = kTXNWantMoviesMask | kTXNWantSoundMask | kTXNWantGraphicsMask ; +#if TARGET_CARBON + if ( !UMAHasAquaLayout() ) +#endif + { + options |= kTXNAlwaysUseQuickDrawTextMask ; + } + TXNInitTextension(fontDescriptions, noOfFontDescriptions, options ); + } + - long menuMgrAttr ; - Gestalt( gestaltMenuMgrAttr , &menuMgrAttr ) ; - if ( menuMgrAttr & gestaltMenuMgrAquaLayoutMask ) - sUMAHasAquaLayout = true ; sUMASystemInitialized = true ; }