summaryrefslogtreecommitdiff
path: root/font.h
blob: 40de96e8d4a6566b4b69fc0834291f1028c93a0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//								-*- c++ -*-

#ifndef VDR_TEXT2SKIN_FONT_H
#define VDR_TEXT2SKIN_FONT_H

#include "common.h"
#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();

private:
	cache_map 		_cache;
};

class cText2SkinFont {
private:
	static cText2SkinFontCache mFontCache;
	// disallow direct construction
	cText2SkinFont(void);
	virtual ~cText2SkinFont();

public:
	static const cFont *Load(const string &Name, int Size);
};

#endif // VDR_TEXT2SKIN_FONT_H