]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fontmgrcmn.cpp
fix compilation in ANSI STL build
[wxWidgets.git] / src / common / fontmgrcmn.cpp
index 6a5d0683ec5fe4c1c2d2cb186754d45e7741aa54..ee2fe4915a632a983939130a9dafdfb9ecb016ea 100644 (file)
@@ -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) )