X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..ed45e26357928c1f33d317fd7dfb1ec617389584:/src/msw/fontenum.cpp diff --git a/src/msw/fontenum.cpp b/src/msw/fontenum.cpp index 1747efcaaf..431c2eae92 100644 --- a/src/msw/fontenum.cpp +++ b/src/msw/fontenum.cpp @@ -32,6 +32,7 @@ #include "wx/font.h" #endif +#include "wx/fontutil.h" #include "wx/fontenum.h" #include "wx/fontmap.h" @@ -104,7 +105,7 @@ int CALLBACK wxFontEnumeratorProc(LPLOGFONT lplf, LPTEXTMETRIC lptm, wxFontEnumeratorHelper::wxFontEnumeratorHelper(wxFontEnumerator *fontEnum) { m_fontEnum = fontEnum; - m_charset = -1; + m_charset = DEFAULT_CHARSET; m_fixedOnly = FALSE; m_enumEncodings = FALSE; } @@ -134,7 +135,7 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) #if defined(__GNUWIN32__) #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 @@ -178,7 +179,7 @@ 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