]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/fontutil.cpp
implement wxFileModificationTime() in terms of wxFileName::GetTimes() (replaces broke...
[wxWidgets.git] / src / unix / fontutil.cpp
index ea483ebed5fe0236834faf2efd6f1f6a4991a88c..80d01451cb388c93c1108ae6d3db95912f2680f7 100644 (file)
@@ -256,7 +256,7 @@ void wxNativeFontInfo::SetUnderlined(bool WXUNUSED(underlined))
 
 void wxNativeFontInfo::SetFaceName(const wxString& facename)
 {
-    pango_font_description_set_family( description, wxGTK_CONV(facename) );
+    pango_font_description_set_family(description, wxGTK_CONV_SYS(facename));
 }
 
 void wxNativeFontInfo::SetFamily(wxFontFamily WXUNUSED(family))
@@ -276,7 +276,7 @@ bool wxNativeFontInfo::FromString(const wxString& s)
     if (description)
         pango_font_description_free( description );
 
-    description = pango_font_description_from_string( wxGTK_CONV( s ) );
+    description = pango_font_description_from_string( wxGTK_CONV_SYS( s ) );
 
     return true;
 }
@@ -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