fixed wxFontMapper behaviour under wxGTK2: it now just maps all encodings to UTF-8

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-02-12 23:39:55 +00:00
parent 0ec80ebe6f
commit 8235976431
2 changed files with 30 additions and 15 deletions

View File

@@ -491,16 +491,23 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding,
const wxString& facename,
bool interactive)
{
wxCHECK_MSG( encodingAlt, false,
_T("wxFontEncoding::GetAltForEncoding(): NULL pointer") );
#ifdef __WXGTK20__
// in GTK+ 2 we can always use UTF-8 for everything so just do it,
// especially as no other font encodings are currently supported
*encodingAlt = wxFONTENCODING_UTF8;
return true;
#else // !wxGTK2
wxNativeEncodingInfo info;
if ( !GetAltForEncoding(encoding, &info, facename, interactive) )
return false;
wxCHECK_MSG( encodingAlt, false,
_T("wxFontEncoding::GetAltForEncoding(): NULL pointer") );
*encodingAlt = info.encoding;
return true;
#endif // wxGTK2/!wxGTK2
}
bool wxFontMapper::IsEncodingAvailable(wxFontEncoding encoding,