X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de6185e212ebc37ff11ff70278e3c4f68419b097..8a16d7370e3cdc7d583a6f14ab11b3a1d27b73df:/src/mac/carbon/font.cpp?ds=sidebyside diff --git a/src/mac/carbon/font.cpp b/src/mac/carbon/font.cpp index 666b85b5f7..ff9671bd6c 100644 --- a/src/mac/carbon/font.cpp +++ b/src/mac/carbon/font.cpp @@ -16,10 +16,11 @@ #ifndef WX_PRECOMP #include "wx/string.h" #include "wx/utils.h" + #include "wx/intl.h" + #include "wx/gdicmn.h" #endif #include "wx/fontutil.h" -#include "wx/gdicmn.h" #include "wx/fontutil.h" #include "wx/mac/private.h" @@ -268,6 +269,7 @@ 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 ); } } @@ -471,13 +473,15 @@ void wxFont::SetWeight(int weight) RealizeResource(); } -void wxFont::SetFaceName(const wxString& faceName) +bool wxFont::SetFaceName(const wxString& faceName) { Unshare(); M_FONTDATA->m_faceName = faceName; RealizeResource(); + + return wxFontBase::SetFaceName(faceName); } void wxFont::SetUnderlined(bool underlined)