X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/987e9419b60410de582a274a20b9bf4dd0ae986f..851dee09b5ab50a69519a39b0f3f6b95b1a63373:/src/mac/carbon/font.cpp diff --git a/src/mac/carbon/font.cpp b/src/mac/carbon/font.cpp index 522bd7ee1c..404b356b05 100644 --- a/src/mac/carbon/font.cpp +++ b/src/mac/carbon/font.cpp @@ -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)