]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/font.cpp
Include wx/scrolbar.h according to precompiled headers of wx/wx.h (with other minor...
[wxWidgets.git] / src / mac / carbon / font.cpp
index b905f5bd09df7c5a387e866ceb1e28d8651b867b..404b356b05cbb299ab60f6402e057dcff765bf7c 100644 (file)
 #ifndef WX_PRECOMP
     #include "wx/string.h"
     #include "wx/utils.h"
 #ifndef WX_PRECOMP
     #include "wx/string.h"
     #include "wx/utils.h"
+    #include "wx/intl.h"
 #endif
 
 #include "wx/fontutil.h"
 #include "wx/gdicmn.h"
 #include "wx/fontutil.h"
 #endif
 
 #include "wx/fontutil.h"
 #include "wx/gdicmn.h"
 #include "wx/fontutil.h"
-#include "wx/intl.h"
 
 #include "wx/mac/private.h"
 
 
 #include "wx/mac/private.h"
 
@@ -269,6 +269,7 @@ void wxFontRefData::MacFindFont()
             {
                 wxMacCFStringHolder cf( m_faceName, wxLocale::GetSystemEncoding() );
                 ATSFontFamilyRef atsfamily = ATSFontFamilyFindFromName( cf , kATSOptionFlagsDefault );
             {
                 wxMacCFStringHolder cf( m_faceName, wxLocale::GetSystemEncoding() );
                 ATSFontFamilyRef atsfamily = ATSFontFamilyFindFromName( cf , kATSOptionFlagsDefault );
+                wxASSERT_MSG( atsfamily != (ATSFontFamilyRef) -1 , wxT("ATSFontFamilyFindFromName failed") );
                 m_macFontFamily = FMGetFontFamilyFromATSFontFamilyRef( atsfamily );
             }
         }
                 m_macFontFamily = FMGetFontFamilyFromATSFontFamilyRef( atsfamily );
             }
         }
@@ -472,13 +473,15 @@ void wxFont::SetWeight(int weight)
     RealizeResource();
 }
 
     RealizeResource();
 }
 
-void wxFont::SetFaceName(const wxString& faceName)
+bool wxFont::SetFaceName(const wxString& faceName)
 {
     Unshare();
 
     M_FONTDATA->m_faceName = faceName;
 
     RealizeResource();
 {
     Unshare();
 
     M_FONTDATA->m_faceName = faceName;
 
     RealizeResource();
+
+    return wxFontBase::SetFaceName(faceName);
 }
 
 void wxFont::SetUnderlined(bool underlined)
 }
 
 void wxFont::SetUnderlined(bool underlined)