-#ifndef HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE
- if (g_ascii_strcasecmp( pango_font_description_get_family( description ), "monospace" ) == 0)
- return wxFONTFAMILY_TELETYPE;
-#else
-
- PangoFontFamily **families;
- PangoFontFamily *family;
- int n_families;
- pango_context_list_families(
+ wxFontFamily ret = wxFONTFAMILY_DEFAULT;
+ char *family_text = g_ascii_strdown( pango_font_description_get_family( description ), -1 );
+ // Check for some common fonts, to salvage what we can from the current win32 centric wxFont API:
+ if (strncmp( family_text, "monospace", 9 ) == 0)
+ ret = wxFONTFAMILY_TELETYPE; // begins with "Monospace"
+ else if (strncmp( family_text, "courier", 7 ) == 0)
+ ret = wxFONTFAMILY_TELETYPE; // begins with "Courier"
+#if defined(__WXGTK24__) || defined(HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE)
+ else
+#ifdef __WXGTK24__
+ if (!gtk_check_version(2,4,0))
+#endif
+ {
+ PangoFontFamily **families;
+ PangoFontFamily *family = NULL;
+ int n_families;
+ pango_context_list_families(