// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "fontenum.h"
#endif
-#include "wx/defs.h"
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
#include "wx/dynarray.h"
#include "wx/string.h"
#include "wx/regex.h"
#include "wx/fontmap.h"
#include "wx/fontenum.h"
#include "wx/fontutil.h"
+#include "wx/encinfo.h"
// ----------------------------------------------------------------------------
// Pango
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;
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));
+ }
}
}