1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/dfb/private/fontmgr.h
3 // Purpose: font management for wxDFB
4 // Author: Vaclav Slavik
7 // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
8 // (c) 2006 REA Elektronik GmbH
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_DFB_PRIVATE_FONTMGR_H_
13 #define _WX_DFB_PRIVATE_FONTMGR_H_
15 #include "wx/dfb/wrapdfb.h"
19 class wxFontInstance
: public wxFontInstanceBase
22 wxFontInstance(float ptSize
, bool aa
, const wxString
& filename
);
24 wxIDirectFBFontPtr
GetDirectFBFont() const { return m_font
; }
27 wxIDirectFBFontPtr m_font
;
30 class wxFontFace
: public wxFontFaceBase
33 wxFontFace(const wxString
& filename
) : m_fileName(filename
) {}
36 wxFontInstance
*CreateFontInstance(float ptSize
, bool aa
);
42 class wxFontBundle
: public wxFontBundleBase
45 wxFontBundle(const wxString
& name
,
46 const wxString
& fileRegular
,
47 const wxString
& fileBold
,
48 const wxString
& fileItalic
,
49 const wxString
& fileBoldItalic
,
52 /// Returns name of the family
53 virtual wxString
GetName() const { return m_name
; }
55 virtual bool IsFixed() const { return m_isFixed
; }
62 class wxFontsManager
: public wxFontsManagerBase
65 wxFontsManager() { AddAllFonts(); }
67 virtual wxString
GetDefaultFacename(wxFontFamily family
) const
69 return m_defaultFacenames
[family
];
73 // adds all fonts using AddBundle()
75 void AddFontsFromDir(const wxString
& indexFile
);
76 void AddFont(const wxString
& dir
, const wxString
& name
, wxFileConfig
& cfg
);
77 void SetDefaultFonts(wxFileConfig
& cfg
);
81 wxString m_defaultFacenames
[wxFONTFAMILY_MAX
];
84 #endif // _WX_DFB_PRIVATE_FONTMGR_H_