]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/fontenum.cpp
merged MapBitmap() from 2.2 branch
[wxWidgets.git] / src / unix / fontenum.cpp
index e8a9c18f75d095c48a05e7f2ad60d34d92145af0..5cd8a2698110f80b618ec33630dc228f9664605f 100644 (file)
 #include "wx/string.h"
 #include "wx/utils.h"
 
 #include "wx/string.h"
 #include "wx/utils.h"
 
+#include "wx/fontmap.h"
 #include "wx/fontenum.h"
 #include "wx/fontutil.h"
 
 #include "wx/fontenum.h"
 #include "wx/fontutil.h"
 
+#ifdef __VMS__ // Xlib.h for VMS is not (yet) compatible with C++
+               // The resulting warnings are switched off here
+#pragma message disable nosimpint
+#endif
 #include <X11/Xlib.h>
 #include <X11/Xlib.h>
+#ifdef __VMS__
+#pragma message enable nosimpint
+#endif
 
 // ----------------------------------------------------------------------------
 // private functions
 
 // ----------------------------------------------------------------------------
 // private functions
@@ -65,6 +73,14 @@ static char **CreateFontList(wxChar spacing,
     wxNativeEncodingInfo info;
     wxGetNativeFontEncoding(encoding, &info);
 
     wxNativeEncodingInfo info;
     wxGetNativeFontEncoding(encoding, &info);
 
+#if wxUSE_FONTMAP
+    if ( !wxTestFontEncoding(info) )
+    {
+        // ask font mapper for a replacement
+        (void)wxTheFontMapper->GetAltForEncoding(encoding, &info);
+    }
+#endif // wxUSE_FONTMAP
+
     wxString pattern;
     pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"),
                    spacing,
     wxString pattern;
     pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"),
                    spacing,