]>
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
6 // Copyright: (c) 2006 REA Elektronik GmbH
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
17 #include "wx/fontenum.h"
18 #include "wx/private/fontmgr.h"
22 // ----------------------------------------------------------------------------
24 // ----------------------------------------------------------------------------
26 bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding
,
29 // we only support UTF-8 and system (which means "use any"):
30 if ( encoding
!= wxFONTENCODING_SYSTEM
&& encoding
!= wxFONTENCODING_UTF8
)
34 const wxFontBundleList
& list
= wxFontsManager::Get()->GetBundles();
36 for ( wxFontBundleList::const_iterator f
= list
.begin(); f
!= list
.end(); ++f
)
38 if ( fixedWidthOnly
&& !(*f
)->IsFixed() )
42 if ( !OnFacename((*f
)->GetName()) )
43 break; // OnFacename() requests us to stop enumeration
49 bool wxFontEnumerator::EnumerateEncodings(const wxString
& facename
)
51 return EnumerateEncodingsUTF8(facename
);
54 #endif // wxUSE_FONTENUM