1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/dfb/private/fontmgr.h
3 // Purpose: font management for wxDFB
4 // Author: Vaclav Slavik
6 // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
7 // (c) 2006 REA Elektronik GmbH
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_DFB_PRIVATE_FONTMGR_H_
12 #define _WX_DFB_PRIVATE_FONTMGR_H_
14 #include "wx/dfb/wrapdfb.h"
18 class wxFontInstance
: public wxFontInstanceBase
21 wxFontInstance(float ptSize
, bool aa
, const wxString
& filename
);
23 wxIDirectFBFontPtr
GetDirectFBFont() const { return m_font
; }
26 wxIDirectFBFontPtr m_font
;
29 class wxFontFace
: public wxFontFaceBase
32 wxFontFace(const wxString
& filename
) : m_fileName(filename
) {}
35 wxFontInstance
*CreateFontInstance(float ptSize
, bool aa
);
41 class wxFontBundle
: public wxFontBundleBase
44 wxFontBundle(const wxString
& name
,
45 const wxString
& fileRegular
,
46 const wxString
& fileBold
,
47 const wxString
& fileItalic
,
48 const wxString
& fileBoldItalic
,
51 /// Returns name of the family
52 virtual wxString
GetName() const { return m_name
; }
54 virtual bool IsFixed() const { return m_isFixed
; }
61 class wxFontsManager
: public wxFontsManagerBase
64 wxFontsManager() { AddAllFonts(); }
66 virtual wxString
GetDefaultFacename(wxFontFamily family
) const
68 return m_defaultFacenames
[family
];
72 // adds all fonts using AddBundle()
74 void AddFontsFromDir(const wxString
& indexFile
);
75 void AddFont(const wxString
& dir
, const wxString
& name
, wxFileConfig
& cfg
);
76 void SetDefaultFonts(wxFileConfig
& cfg
);
80 wxString m_defaultFacenames
[wxFONTFAMILY_MAX
];
83 #endif // _WX_DFB_PRIVATE_FONTMGR_H_