+ return g_utf8_collate (a_name, b_name);
+}
+
+bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
+ bool fixedWidthOnly)
+{
+ if ( encoding != wxFONTENCODING_SYSTEM && encoding != wxFONTENCODING_UTF8 )
+ {
+ // Pango supports only UTF-8 encoding (and system means any, so we
+ // accept it too)
+ return false;
+ }
+
+ PangoFontFamily **families = NULL;
+ gint n_families = 0;
+ pango_context_list_families (
+#ifdef __WXGTK20__
+ gtk_widget_get_pango_context( wxGetRootWindow() ),
+#else
+ wxTheApp->GetPangoContext(),
+#endif
+ &families, &n_families );
+ qsort (families, n_families, sizeof (PangoFontFamily *), wxCompareFamilies);
+
+ for ( int i = 0; i < n_families; i++ )
+ {
+#if defined(__WXGTK20__) || defined(HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE)
+ if ( !fixedWidthOnly ||
+ pango_font_family_is_monospace(families[i]) )
+#endif
+ {
+ const gchar *name = pango_font_family_get_name(families[i]);
+ OnFacename(wxString(name, wxConvUTF8));
+ }
+ }
+ g_free(families);
+
+ return true;
+}
+
+bool wxFontEnumerator::EnumerateEncodings(const wxString& facename)
+{
+ return EnumerateEncodingsUTF8(facename);
+}
+
+
+#else // !wxUSE_PANGO
+
+#ifdef __VMS__ // Xlib.h for VMS is not (yet) compatible with C++
+ // The resulting warnings are switched off here
+#pragma message disable nosimpint
+#endif