]> git.saurik.com Git - wxWidgets.git/commitdiff
changing asserts to debug info
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 26 Jan 2007 17:36:53 +0000 (17:36 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 26 Jan 2007 17:36:53 +0000 (17:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/font.cpp

index 7766ff4e538bba84f5a801f5f9078a82071037f5..9b5e4bb5a773ed5cade3d427b54761cd412ee21c 100644 (file)
@@ -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 );
             }
         }