]> git.saurik.com Git - wxWidgets.git/commitdiff
pretend that we support all encodings instead of not supporting any of them under...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 21 Jul 2004 21:54:54 +0000 (21:54 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 21 Jul 2004 21:54:54 +0000 (21:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/unix/fontutil.cpp

index c6bc4f93a26fe22977211300c59bcd5eb3f82f49..6599fa5e7114c93a99558c86b777d2a4ae01a0b3 100644 (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