X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..1480c61ae8f3a1e698deb3fde7c4b8055ac977b8:/src/unix/fontenum.cpp diff --git a/src/unix/fontenum.cpp b/src/unix/fontenum.cpp index 9ef4f46f20..4ba3e6512d 100644 --- a/src/unix/fontenum.cpp +++ b/src/unix/fontenum.cpp @@ -6,7 +6,7 @@ // Created: 01.10.99 // RCS-ID: $Id$ // Copyright: (c) Vadim Zeitlin -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -60,11 +60,13 @@ cmp_families (const void *a, const void *b) bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding, bool fixedWidthOnly) { +#ifndef HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE if ( fixedWidthOnly ) { OnFacename( wxT("monospace") ); } else +#endif { PangoFontFamily **families = NULL; gint n_families = 0; @@ -79,10 +81,14 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding, for (int i=0; i<n_families; i++) { - const gchar *name = pango_font_family_get_name( families[i] ); - - wxString tmp( name, wxConvUTF8 ); - OnFacename( tmp ); +#ifdef 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)); + } } }