]>
git.saurik.com Git - wxWidgets.git/blob - src/dfb/fontenum.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/dfb/fontenum.cpp
3 // Purpose: wxFontEnumerator class
4 // Author: Vaclav Slavik
7 // Copyright: (c) 2006 REA Elektronik GmbH
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #include "wx/fontenum.h"
19 #include "wx/private/fontmgr.h"
23 // ----------------------------------------------------------------------------
25 // ----------------------------------------------------------------------------
27 bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding
,
30 // we only support UTF-8 and system (which means "use any"):
31 if ( encoding
!= wxFONTENCODING_SYSTEM
&& encoding
!= wxFONTENCODING_UTF8
)
35 const wxFontBundleList
& list
= wxFontsManager::Get()->GetBundles();
37 for ( wxFontBundleList::const_iterator f
= list
.begin(); f
!= list
.end(); ++f
)
39 if ( fixedWidthOnly
&& !(*f
)->IsFixed() )
43 if ( !OnFacename((*f
)->GetName()) )
44 break; // OnFacename() requests us to stop enumeration
50 bool wxFontEnumerator::EnumerateEncodings(const wxString
& facename
)
52 return EnumerateEncodingsUTF8(facename
);
55 #endif // wxUSE_FONTENUM