]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/fontenum.cpp
wxSIZE_ALLOW_MINUS_ONE handling corrected
[wxWidgets.git] / src / unix / fontenum.cpp
index e8a9c18f75d095c48a05e7f2ad60d34d92145af0..a1d374896eee08ef33c08ab9ca2fa7124d2c5d7e 100644 (file)
@@ -26,6 +26,7 @@
 #include "wx/string.h"
 #include "wx/utils.h"
 
+#include "wx/fontmap.h"
 #include "wx/fontenum.h"
 #include "wx/fontutil.h"
 
@@ -65,6 +66,12 @@ static char **CreateFontList(wxChar spacing,
     wxNativeEncodingInfo info;
     wxGetNativeFontEncoding(encoding, &info);
 
+    if ( !wxTestFontEncoding(info) )
+    {
+        // ask font mapper for a replacement
+        (void)wxTheFontMapper->GetAltForEncoding(encoding, &info);
+    }
+
     wxString pattern;
     pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"),
                    spacing,