From: Vadim Zeitlin Date: Wed, 21 Jul 2004 21:54:54 +0000 (+0000) Subject: pretend that we support all encodings instead of not supporting any of them under... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f8b2997476e15b63f1699b9f7b6f1db2ae6b440c?ds=inline 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 --- diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index c6bc4f93a2..6599fa5e71 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -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