X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/83eabba429ab076322fbdddd1d011c73af814fe2..2cf3a6d7bef6f20bea35062dd3d4dbf0aec9efb5:/src/mac/carbon/font.cpp?ds=sidebyside diff --git a/src/mac/carbon/font.cpp b/src/mac/carbon/font.cpp index b905f5bd09..ff9671bd6c 100644 --- a/src/mac/carbon/font.cpp +++ b/src/mac/carbon/font.cpp @@ -16,12 +16,12 @@ #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/intl.h" #include "wx/mac/private.h" @@ -269,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 ); } } @@ -472,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)