]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation fixes for !wxUSE_FONTMEM case
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 6 May 2008 21:11:59 +0000 (21:11 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 6 May 2008 21:11:59 +0000 (21:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/dfb/fontenum.cpp
src/xrc/xmlres.cpp

index fe1e05340e9c6f8a0dde82253b0b815f1a04bf08..71be1d3d1fdc3fc9e2edcce35afc04373660ccde 100644 (file)
@@ -18,6 +18,8 @@
 #include "wx/fontenum.h"
 #include "wx/private/fontmgr.h"
 
+#if wxUSE_FONTENUM
+
 // ----------------------------------------------------------------------------
 // wxFontEnumerator
 // ----------------------------------------------------------------------------
@@ -49,3 +51,5 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& facename)
 {
     return EnumerateEncodingsUTF8(facename);
 }
+
+#endif // wxUSE_FONTENUM
index 4eed81980c663688405da8ec356a9a4fdd0fd851..c93f2ef02303552a30d4d7a1673026bfbfa1b532 100644 (file)
@@ -1440,8 +1440,9 @@ wxFont wxXmlResourceHandler::GetFont(const wxString& param)
     if (hasFacename)
     {
         wxString faces = GetParamValue(wxT("face"));
-        wxArrayString facenames(wxFontEnumerator::GetFacenames());
         wxStringTokenizer tk(faces, wxT(","));
+#if wxUSE_FONTENUM
+        wxArrayString facenames(wxFontEnumerator::GetFacenames());
         while (tk.HasMoreTokens())
         {
             int index = facenames.Index(tk.GetNextToken(), false);
@@ -1451,6 +1452,11 @@ wxFont wxXmlResourceHandler::GetFont(const wxString& param)
                 break;
             }
         }
+#else // !wxUSE_FONTENUM
+        // just use the first face name if we can't check its availability:
+        if (tk.HasMoreTokens())
+            facename = tk.GetNextToken();
+#endif // wxUSE_FONTENUM/!wxUSE_FONTENUM
     }
 
     // encoding