diff options
author | louis <louis.braun@gmx.de> | 2014-09-27 09:25:14 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2014-09-27 09:25:14 +0200 |
commit | b0509b5182b6e0d04f05e6b3d5676b0d21f51966 (patch) | |
tree | 22b302342f22843e0815eb5f516c85f1478cbf0b /libcore/fontmanager.h | |
download | vdr-plugin-skindesigner-0.0.1.tar.gz vdr-plugin-skindesigner-0.0.1.tar.bz2 |
initial commit version 0.0.10.0.1
Diffstat (limited to 'libcore/fontmanager.h')
-rw-r--r-- | libcore/fontmanager.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/libcore/fontmanager.h b/libcore/fontmanager.h new file mode 100644 index 0000000..7067dfc --- /dev/null +++ b/libcore/fontmanager.h @@ -0,0 +1,35 @@ +#ifndef __FONTMANAGER_H +#define __FONTMANAGER_H + +#include <string> +#include <map> +#include <vector> +#include <vdr/skins.h> + +#include "../libtemplate/template.h" + +using namespace std; + +class cFontManager { + private: + static cMutex mutex; + map < string, map< int, cFont* > > fonts; + cFont *CreateFont(string name, int size); + void InsertFont(string name, int size); + cFont *GetFont(string name, int size); + int GetFontHeight(const char *name, int height, int charWidth = 0); + public: + cFontManager(); + ~cFontManager(); + void Lock(void) { mutex.Lock(); }; + void Unlock(void) { mutex.Unlock(); }; + void CacheFonts(cTemplate *tpl); + void DeleteFonts(void); + int Width(string fontName, int fontSize, const char *text); + int Height(string fontName, int fontSize); + cFont *Font(string fontName, int fontSize); + void Debug(void); + void ListAvailableFonts(void); +}; + +#endif //__FONTMANAGER_H
\ No newline at end of file |