X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d7ae4a62645d369fbd6b8b5f3f0e12ee86536da1..b05fde97c58db22ddf4f98581787817a2dd494dc:/src/common/fontmgrcmn.cpp diff --git a/src/common/fontmgrcmn.cpp b/src/common/fontmgrcmn.cpp index 6a5d0683ec..ee2fe4915a 100644 --- a/src/common/fontmgrcmn.cpp +++ b/src/common/fontmgrcmn.cpp @@ -110,7 +110,8 @@ wxFontFace *wxFontBundleBase::GetFace(FaceType type) const wxFontFace * wxFontBundleBase::GetFaceForFont(const wxFontMgrFontRefData& font) const { - wxASSERT_MSG( font.GetFaceName().empty() || font.GetFaceName() == GetName(), + wxASSERT_MSG( font.GetFaceName().empty() || + GetName().CmpNoCase(font.GetFaceName()) == 0, _T("calling GetFaceForFont for incompatible font") ); int type = FaceType_Regular; @@ -129,6 +130,8 @@ wxFontBundleBase::GetFaceForFont(const wxFontMgrFontRefData& font) const if ( !HasFace((FaceType)type) ) { + // if we can't get the exact font requested, substitute it with + // some other variant: for (int i = 0; i < FaceType_Max; i++) { if ( HasFace((FaceType)i) )