From 5382d18d05d358bb1c313c642395e835aa44a6a0 Mon Sep 17 00:00:00 2001 From: lordjaxom <lordjaxom> Date: Wed, 8 Dec 2004 18:48:39 +0000 Subject: 1.0-pre1 --- font.h | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) (limited to 'font.h') 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 -- cgit v1.2.3