summaryrefslogtreecommitdiff
path: root/font.h
diff options
context:
space:
mode:
Diffstat (limited to 'font.h')
-rw-r--r--font.h44
1 files changed, 16 insertions, 28 deletions
diff --git a/font.h b/font.h
index dfc007f..160076c 100644
--- a/font.h
+++ b/font.h
@@ -1,39 +1,27 @@
/*
- * $Id: font.h,v 1.4 2004/06/02 20:43:05 lordjaxom Exp $
+ * $Id: font.h,v 1.5 2004/12/08 17:23:41 lordjaxom Exp $
*/
-#ifndef VDR_TEXT2SKIN_FREETYPE_H
-#define VDR_TEXT2SKIN_FREETYPE_H
+#ifndef VDR_TEXT2SKIN_FONT_H
+#define VDR_TEXT2SKIN_FONT_H
#include "common.h"
-#include "data.h"
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#ifdef HAVE_FREETYPE
+# include "graphtft/font.h"
+#endif
+class cText2SkinFont {
+private:
+#ifdef HAVE_FREETYPE
+ static cGraphtftFont mFontCache;
+#endif
-// kannst noch einbauen, dass er die fonts "fontOsd" "fontSml" und "fontFix" aus VDR statt aus freetype nimmt
+ // disallow direct construction
+ cText2SkinFont(void);
+ virtual ~cText2SkinFont();
-// ==================================
-/* cText2SkinFont
-
- Adds interface to FreeTpye font lib.
-*/
-class cText2SkinFont
-{
public:
- cText2SkinFont();
- ~cText2SkinFont();
-
- // font handling
- bool LoadFontFile(string Filename);
- void SetFontSize(int size);
- void DrawTextTransparent(cOsd *Osd, int x, int y, const char *s, tColor ColorFg, int Width, int Height, int Alignment);
-
-private:
- FT_Library m_library;
- FT_Face m_face;
- FT_GlyphSlot m_slot;
-
+ static const cFont *Load(const std::string &Path, const std::string &Filename, int Size);
};
-#endif /*VDR_TEXT2SKIN_FREETYPE_H*/
+#endif // VDR_TEXT2SKIN_FONT_H