X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/826800550bbae872019365280e13db83f3677346..164f091f4bb7bfd23c1f7af516327207c2193482:/src/unix/fontutil.cpp 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