backport from HEAD: don't assert about font face errors, just log it
and use the default git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44375 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -263,6 +263,11 @@ void wxFontRefData::MacFindFont()
|
||||
#ifndef __LP64__
|
||||
wxMacStringToPascal( m_faceName , qdFontName );
|
||||
m_macFontFamily = FMGetFontFamilyFromName( qdFontName );
|
||||
if ( m_macFontFamily == kInvalidFontFamily )
|
||||
{
|
||||
wxLogDebug( wxT("ATSFontFamilyFindFromName failed for %s"), m_faceName );
|
||||
m_macFontFamily = GetAppFont();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -283,8 +288,13 @@ void wxFontRefData::MacFindFont()
|
||||
{
|
||||
wxMacCFStringHolder cf( m_faceName, wxLocale::GetSystemEncoding() );
|
||||
ATSFontFamilyRef atsfamily = ATSFontFamilyFindFromName( cf , kATSOptionFlagsDefault );
|
||||
wxASSERT_MSG( atsfamily != (ATSFontFamilyRef) -1 , wxT("ATSFontFamilyFindFromName failed") );
|
||||
m_macFontFamily = FMGetFontFamilyFromATSFontFamilyRef( atsfamily );
|
||||
if ( atsfamily == (ATSFontFamilyRef) -1 )
|
||||
{
|
||||
wxLogDebug( wxT("ATSFontFamilyFindFromName failed for %s"), m_faceName );
|
||||
m_macFontFamily = GetAppFont();
|
||||
}
|
||||
else
|
||||
m_macFontFamily = FMGetFontFamilyFromATSFontFamilyRef( atsfamily );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -863,6 +863,7 @@ void wxMacControl::Init()
|
||||
|
||||
void wxMacControl::Dispose()
|
||||
{
|
||||
wxASSERT_MSG( m_controlRef != NULL , wxT("Control Handle already NULL, Dispose called twice ?") );
|
||||
wxASSERT_MSG( IsValidControlHandle(m_controlRef) , wxT("Invalid Control Handle (maybe already released) in Dispose") );
|
||||
|
||||
// we cannot check the ref count here anymore, as autorelease objects might delete their refs later
|
||||
|
Reference in New Issue
Block a user