summaryrefslogtreecommitdiff
path: root/font.h
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2004-12-08 18:48:39 +0000
committerlordjaxom <lordjaxom>2004-12-08 18:48:39 +0000
commit5382d18d05d358bb1c313c642395e835aa44a6a0 (patch)
tree2b5ef58620b3640c5b21e8eafe92ee4b266b1d30 /font.h
parenteb2f2c9600e8f69788232582191b141002bcd522 (diff)
downloadvdr-plugin-text2skin-5382d18d05d358bb1c313c642395e835aa44a6a0.tar.gz
vdr-plugin-text2skin-5382d18d05d358bb1c313c642395e835aa44a6a0.tar.bz2
1.0-pre1v1.0-pre1
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