#pragma hdrstop
#endif
+#if wxUSE_FONTMAP
+
#ifndef WX_PRECOMP
#include "wx/font.h"
#endif
+#include "wx/fontutil.h"
#include "wx/fontenum.h"
#include "wx/fontmap.h"
wxFontEnumeratorHelper::wxFontEnumeratorHelper(wxFontEnumerator *fontEnum)
{
m_fontEnum = fontEnum;
- m_charset = -1;
+ m_charset = DEFAULT_CHARSET;
m_fixedOnly = FALSE;
m_enumEncodings = FALSE;
}
return TRUE;
}
-#if defined(__GNUWIN32__)
+#if defined(__GNUWIN32__) && !defined(__CYGWIN10__)
#if wxUSE_NORLANDER_HEADERS
- #define wxFONTENUMPROC int(*)(const LOGFONTA *, const TEXTMETRICA *, long unsigned int, LPARAM)
+ #define wxFONTENUMPROC int(*)(const LOGFONT *, const TEXTMETRIC *, long unsigned int, LPARAM)
#else
#define wxFONTENUMPROC int(*)(ENUMLOGFONTEX *, NEWTEXTMETRICEX*, int, LPARAM)
#endif
wxConstCast(this, wxFontEnumeratorHelper)->m_charsets.Add(cs);
wxFontEncoding enc = wxGetFontEncFromCharSet(cs);
- return m_fontEnum->OnFontEncoding(m_family,
+ return m_fontEnum->OnFontEncoding(lf->lfFaceName,
wxFontMapper::GetEncodingName(enc));
}
else
return fontEnum->OnFont(lplf, lptm);
}
+#endif // wxUSE_FONTMAP