diff --git a/src/common/fontenumcmn.cpp b/src/common/fontenumcmn.cpp index 423f8dbb64..d0df597226 100644 --- a/src/common/fontenumcmn.cpp +++ b/src/common/fontenumcmn.cpp @@ -124,7 +124,8 @@ bool wxFontEnumerator::EnumerateEncodingsUTF8(const wxString& facename) for ( size_t n = 0; n < count; n++ ) { - OnFontEncoding(facenames[n], utf8); + if ( !OnFontEncoding(facenames[n], utf8) ) + break; } return true; diff --git a/src/unix/fontenum.cpp b/src/unix/fontenum.cpp index a3db802dc1..a396c94c05 100644 --- a/src/unix/fontenum.cpp +++ b/src/unix/fontenum.cpp @@ -81,7 +81,10 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding, #endif { const gchar *name = pango_font_family_get_name(families[i]); - OnFacename(wxString(name, wxConvUTF8)); + if ( !OnFacename(wxString(name, wxConvUTF8)) ) + { + break; + } } } g_free(families);