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;
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) )