# by Stone ## Changes for VDR >= 1.5.4. diff -Nru text2skin-1.1-cvs/graphtft/font.c text2skin-1.1-cvs-vdr-1.5.4/graphtft/font.c --- text2skin-1.1-cvs/graphtft/font.c 2008-04-13 11:29:50.000000000 +0200 +++ text2skin-1.1-cvs-vdr-1.5.4/graphtft/font.c 2008-04-13 11:28:48.000000000 +0200 @@ -41,6 +41,7 @@ if ( _cache.find(CacheName) != _cache.end() ) return true; +#if VDRVERSNUM < 10503 int error = FT_New_Face(_library, Filename.c_str(), format, &_face); // every thing ok? @@ -187,6 +188,17 @@ delete(font_data); // Something went wrong! return false; +#else +#if VDRVERSNUM < 10504 + cFont* newFont = new cFreetypeFont(*AddDirectory(FONTDIR, Filename.c_str()), Size); +#else + cFont* newFont = cFont::CreateFont(Filename.c_str(), Size); +#endif + if ( newFont == NULL ) + return false; + _cache[CacheName] = newFont; + return true; +#endif } const cFont* cGraphtftFont::GetFont(string CacheName){ @@ -210,10 +222,12 @@ delete((*it).second); _cache.clear(); +#if VDRVERSNUM < 10503 del_map::iterator del_it = _del.begin(); for (; del_it != _del.end(); ++del_it) delete((*del_it).second); _del.clear(); +#endif } cGraphtftFont GraphtftFont; diff -Nru text2skin-1.1-cvs/graphtft/font.h text2skin-1.1-cvs-vdr-1.5.4/graphtft/font.h --- text2skin-1.1-cvs/graphtft/font.h 2004-12-19 23:03:24.000000000 +0100 +++ text2skin-1.1-cvs-vdr-1.5.4/graphtft/font.h 2008-04-13 11:29:13.000000000 +0200 @@ -24,7 +24,9 @@ { private: typedef map cache_map; +#if VDRVERSNUM < 10503 typedef map del_map; +#endif public: cGraphtftFont(); @@ -40,7 +42,9 @@ FT_Face _face; FT_GlyphSlot _slot; cache_map _cache; +#if VDRVERSNUM < 10503 del_map _del; +#endif };