#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"
// private functions
// ----------------------------------------------------------------------------
+#ifndef __WXMICROWIN__
int CALLBACK wxFontEnumeratorProc(LPLOGFONT lplf, LPTEXTMETRIC lptm,
DWORD dwStyle, LONG lParam);
+#endif
// ============================================================================
// implementation
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
void wxFontEnumeratorHelper::DoEnumerate()
{
+#ifndef __WXMICROWIN__
HDC hDC = ::GetDC(NULL);
#ifdef __WIN32__
#endif // Win32/16
::ReleaseDC(NULL, hDC);
+#endif
}
bool wxFontEnumeratorHelper::OnFont(const LPLOGFONT lf,
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
// Windows callbacks
// ----------------------------------------------------------------------------
+#ifndef __WXMICROWIN__
int CALLBACK wxFontEnumeratorProc(LPLOGFONT lplf, LPTEXTMETRIC lptm,
DWORD dwStyle, LONG lParam)
{
return fontEnum->OnFont(lplf, lptm);
}
+#endif
+#endif // wxUSE_FONTMAP