pretend that we support all encodings instead of not supporting any of them under GTK2 (this at least prevents wxFontMapper from aborting the program with 'can't create any font' message)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2004-07-21 21:54:54 +00:00
parent 8423f11763
commit f8b2997476

View File

@ -237,7 +237,17 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& info)
bool wxGetNativeFontEncoding(wxFontEncoding encoding,
wxNativeEncodingInfo *info)
{
return FALSE;
// we *must* return true for default encoding as otherwise wxFontMapper
// considers that we can't load any font and aborts with wxLogFatalError!
if ( encoding == wxFONTENCODING_SYSTEM )
{
info->facename.clear();
info->encoding = wxFONTENCODING_SYSTEM;
}
// pretend that we support everything, it's better than to always return
// false as the old code did
return true;
}
#else // GTK+ 1.x