]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/fontenum.cpp
Add wxGrid::Render() for drawing the grid to any wxDC.
[wxWidgets.git] / src / msw / fontenum.cpp
index fe70af5e6b12332170f2cb8b8c2f9bece62489ca..3c936a11feee1f4946de40842ef53463f56eef89 100644 (file)
 
 #if wxUSE_FONTENUM
 
+#include "wx/fontenum.h"
+
 #ifndef WX_PRECOMP
     #include "wx/gdicmn.h"
     #include "wx/font.h"
-    #include "wx/encinfo.h"
     #include "wx/dynarray.h"
+    #include "wx/msw/private.h"
 #endif
 
-#include "wx/msw/private.h"
-
+#include "wx/encinfo.h"
 #include "wx/fontutil.h"
-#include "wx/fontenum.h"
 #include "wx/fontmap.h"
 
 // ----------------------------------------------------------------------------
@@ -90,7 +90,7 @@ private:
     // the list of facenames we already found while enumerating facenames
     wxArrayString m_facenames;
 
-    DECLARE_NO_COPY_CLASS(wxFontEnumeratorHelper)
+    wxDECLARE_NO_COPY_CLASS(wxFontEnumeratorHelper);
 };
 
 // ----------------------------------------------------------------------------
@@ -187,9 +187,18 @@ bool wxFontEnumeratorHelper::OnFont(const LPLOGFONT lf,
         {
             wxConstCast(this, wxFontEnumeratorHelper)->m_charsets.Add(cs);
 
+#if wxUSE_FONTMAP
             wxFontEncoding enc = wxGetFontEncFromCharSet(cs);
             return m_fontEnum->OnFontEncoding(lf->lfFaceName,
                                               wxFontMapper::GetEncodingName(enc));
+#else // !wxUSE_FONTMAP
+            // Just use some unique and, hopefully, understandable, name.
+            return m_fontEnum->OnFontEncoding
+                               (
+                                lf->lfFaceName,
+                                wxString::Format(wxS("Code page %d"), cs)
+                               );
+#endif // wxUSE_FONTMAP/!wxUSE_FONTMAP
         }
         else
         {