summaryrefslogtreecommitdiff
path: root/font.h
diff options
context:
space:
mode:
Diffstat (limited to 'font.h')
-rw-r--r--font.h35
1 files changed, 26 insertions, 9 deletions
diff --git a/font.h b/font.h
index 99f1cec..090ac56 100644
--- a/font.h
+++ b/font.h
@@ -6,23 +6,40 @@
#define VDR_TEXT2SKIN_FONT_H
#include "common.h"
-#ifdef HAVE_FREETYPE
-# include "graphtft/font.h"
-#endif
+#include <map>
+#include <string>
+#include <vdr/font.h>
+
+using std::map;
+using std::string;
+
+
+class cText2SkinFontCache
+{
+private:
+ typedef map<string,cFont*> cache_map;
+
+public:
+ cText2SkinFontCache();
+ ~cText2SkinFontCache();
+
+ bool Load(string Name, string CacheName, int Size);
+ const cFont* GetFont(string CacheName);
+ void Clear();
-class cText2SkinFont {
private:
-#ifdef HAVE_FREETYPE
- static cGraphtftFont mFontCache;
-#endif
+ cache_map _cache;
+};
+class cText2SkinFont {
+private:
+ static cText2SkinFontCache mFontCache;
// disallow direct construction
cText2SkinFont(void);
virtual ~cText2SkinFont();
public:
- static const cFont *Load(const std::string &Path, const std::string &Filename, int Size,
- int Width);
+ static const cFont *Load(const string &Name, int Size);
};
#endif // VDR_TEXT2SKIN_FONT_H