]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/fontutil.cpp
remove the vertical scrollbar completely if the control is empty
[wxWidgets.git] / src / unix / fontutil.cpp
index c29cc1aaf0dd95c73226682d25610cfa65a74d07..5230c5a09e912c0285cf8f774764540c8c1afa23 100644 (file)
 #ifndef WX_PRECOMP
     #include "wx/font.h" // wxFont enums
     #include "wx/encinfo.h"
+    #include "wx/hash.h"
 #endif // PCH
 
 #include "wx/fontutil.h"
 #include "wx/fontmap.h"
 #include "wx/tokenzr.h"
-#include "wx/hash.h"
 #include "wx/module.h"
 
 #if wxUSE_PANGO
@@ -322,27 +322,12 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& WXUNUSED(info))
 bool wxGetNativeFontEncoding(wxFontEncoding encoding,
                              wxNativeEncodingInfo *info)
 {
+    // all encodings are available in GTK+ 2 because we translate text in any
+    // encoding to UTF-8 internally anyhow
     info->facename.clear();
+    info->encoding = encoding;
 
-    switch ( encoding )
-    {
-        // we *must* return true for default encodings as otherwise wxFontMapper
-        // considers that we can't load any font and aborts with wxLogFatalError!
-        case wxFONTENCODING_DEFAULT:
-        case wxFONTENCODING_SYSTEM:
-            info->encoding = wxFONTENCODING_SYSTEM;
-            return true;
-
-        case wxFONTENCODING_ISO8859_1:
-        case wxFONTENCODING_UTF8:
-            // these are always supported by GTK+ 2
-            info->encoding = encoding;
-            return true;
-
-        default:
-            // everything else must be converted to UTF-8
-            return false;
-    }
+    return true;
 }
 
 #else // GTK+ 1.x