X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1acca470dfb55b82553af6cdb0c88b3b3a1eb00b..198be845897a79ba350ae7f93db536ddb2eccfb2:/src/unix/fontenum.cpp diff --git a/src/unix/fontenum.cpp b/src/unix/fontenum.cpp index 25ab081632..dc50c9b740 100644 --- a/src/unix/fontenum.cpp +++ b/src/unix/fontenum.cpp @@ -20,6 +20,8 @@ // for compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#if wxUSE_FONTENUM + #include "wx/fontenum.h" #ifndef WX_PRECOMP @@ -112,31 +114,7 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding, bool wxFontEnumerator::EnumerateEncodings(const wxString& facename) { - // name of UTF-8 encoding: no need to use wxFontMapper for it as it's - // unlikely to change - const wxString utf8(_T("UTF-8")); - - - // all fonts are in UTF-8 only when using Pango - if ( !facename.empty() ) - { - OnFontEncoding(facename, utf8); - return true; - } - - // so enumerating all facenames supporting this encoding is the same as - // enumerating all facenames - const wxArrayString facenames(GetFacenames(wxFONTENCODING_UTF8)); - const size_t count = facenames.size(); - if ( !count ) - return false; - - for ( size_t n = 0; n < count; n++ ) - { - OnFontEncoding(facenames[n], utf8); - } - - return true; + return EnumerateEncodingsUTF8(facename); } @@ -384,3 +362,5 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& family) } #endif // !wxUSE_PANGO + +#endif // wxUSE_FONTENUM