From a4087a43244ae57917c28e7980f06a42d7069a8a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 20 Mar 2012 23:26:39 +0000 Subject: [PATCH] Fix wxMSW compilation when wxUSE_FONTMAP==0. Don't use wxFontMapper::GetEncodingName() in wxFontEnumerator if wxFontMapper is not available. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/fontenum.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/msw/fontenum.cpp b/src/msw/fontenum.cpp index f540cf64be..3c936a11fe 100644 --- a/src/msw/fontenum.cpp +++ b/src/msw/fontenum.cpp @@ -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 { -- 2.49.0