changed initialization of TXN in order to avoid crashes on OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -106,12 +106,23 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls )
|
|||||||
|
|
||||||
if ( TXNInitTextension != (void*) kUnresolvedCFragSymbolAddress )
|
if ( TXNInitTextension != (void*) kUnresolvedCFragSymbolAddress )
|
||||||
{
|
{
|
||||||
TXNMacOSPreferredFontDescription defaults;
|
FontFamilyID fontId ;
|
||||||
defaults.fontID = kFontIDGeneva ;
|
Str255 fontName ;
|
||||||
defaults.pointSize = (10 << 16) ;
|
SInt16 fontSize ;
|
||||||
defaults.fontStyle = kTXNDefaultFontStyle;
|
Style fontStyle ;
|
||||||
defaults.encoding = kTXNSystemDefaultEncoding;
|
GetThemeFont(kThemeSmallSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
|
||||||
TXNInitTextension(&defaults, 1, (kTXNAlwaysUseQuickDrawTextMask | kTXNWantMoviesMask | kTXNWantSoundMask | kTXNWantGraphicsMask));
|
GetFNum( fontName, &fontId );
|
||||||
|
|
||||||
|
TXNMacOSPreferredFontDescription fontDescriptions[] =
|
||||||
|
{
|
||||||
|
{ fontId , (fontSize << 16) ,kTXNDefaultFontStyle, kTXNSystemDefaultEncoding } ,
|
||||||
|
} ;
|
||||||
|
int noOfFontDescriptions = sizeof( fontDescriptions ) / sizeof(TXNMacOSPreferredFontDescription) ;
|
||||||
|
#if 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));
|
||||||
}
|
}
|
||||||
|
|
||||||
long menuMgrAttr ;
|
long menuMgrAttr ;
|
||||||
|
@@ -106,12 +106,23 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls )
|
|||||||
|
|
||||||
if ( TXNInitTextension != (void*) kUnresolvedCFragSymbolAddress )
|
if ( TXNInitTextension != (void*) kUnresolvedCFragSymbolAddress )
|
||||||
{
|
{
|
||||||
TXNMacOSPreferredFontDescription defaults;
|
FontFamilyID fontId ;
|
||||||
defaults.fontID = kFontIDGeneva ;
|
Str255 fontName ;
|
||||||
defaults.pointSize = (10 << 16) ;
|
SInt16 fontSize ;
|
||||||
defaults.fontStyle = kTXNDefaultFontStyle;
|
Style fontStyle ;
|
||||||
defaults.encoding = kTXNSystemDefaultEncoding;
|
GetThemeFont(kThemeSmallSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
|
||||||
TXNInitTextension(&defaults, 1, (kTXNAlwaysUseQuickDrawTextMask | kTXNWantMoviesMask | kTXNWantSoundMask | kTXNWantGraphicsMask));
|
GetFNum( fontName, &fontId );
|
||||||
|
|
||||||
|
TXNMacOSPreferredFontDescription fontDescriptions[] =
|
||||||
|
{
|
||||||
|
{ fontId , (fontSize << 16) ,kTXNDefaultFontStyle, kTXNSystemDefaultEncoding } ,
|
||||||
|
} ;
|
||||||
|
int noOfFontDescriptions = sizeof( fontDescriptions ) / sizeof(TXNMacOSPreferredFontDescription) ;
|
||||||
|
#if 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));
|
||||||
}
|
}
|
||||||
|
|
||||||
long menuMgrAttr ;
|
long menuMgrAttr ;
|
||||||
|
Reference in New Issue
Block a user