]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/fontenum.cpp
adding CoreText
[wxWidgets.git] / src / msw / fontenum.cpp
index f540cf64be3c75d559c58d6c7a985c33cbb37ff1..7ebc115010aeb093a6c3199d3a3338e65badd1a9 100644 (file)
@@ -160,7 +160,7 @@ void wxFontEnumeratorHelper::DoEnumerate()
 
 #ifdef __WXWINCE__
     ::EnumFontFamilies(hDC,
 
 #ifdef __WXWINCE__
     ::EnumFontFamilies(hDC,
-                       m_facename.empty() ? NULL : m_facename.wx_str(),
+                       m_facename.empty() ? NULL : wxMSW_CONV_LPCTSTR(m_facename),
                        (wxFONTENUMPROC)wxFontEnumeratorProc,
                        (LPARAM)this) ;
 #else // __WIN32__
                        (wxFONTENUMPROC)wxFontEnumeratorProc,
                        (LPARAM)this) ;
 #else // __WIN32__
@@ -187,9 +187,18 @@ bool wxFontEnumeratorHelper::OnFont(const LPLOGFONT lf,
         {
             wxConstCast(this, wxFontEnumeratorHelper)->m_charsets.Add(cs);
 
         {
             wxConstCast(this, wxFontEnumeratorHelper)->m_charsets.Add(cs);
 
+#if wxUSE_FONTMAP
             wxFontEncoding enc = wxGetFontEncFromCharSet(cs);
             return m_fontEnum->OnFontEncoding(lf->lfFaceName,
                                               wxFontMapper::GetEncodingName(enc));
             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
         {
         }
         else
         {