diff options
author | Andreas Mair <amair.sob@googlemail.com> | 2007-06-25 12:44:11 +0200 |
---|---|---|
committer | Andreas Mair <amair.sob@googlemail.com> | 2007-06-25 12:44:11 +0200 |
commit | fc61e314442d22bb7886dba77380497b776fcb62 (patch) | |
tree | b6e891bb760438f2209d5f24ab489d8d01579026 /font.c | |
parent | ae9c6ccad6ba1ab419fe73d9e75f545cbbb62c96 (diff) | |
download | vdr-plugin-skinenigmang-fc61e314442d22bb7886dba77380497b776fcb62.tar.gz vdr-plugin-skinenigmang-fc61e314442d22bb7886dba77380497b776fcb62.tar.bz2 |
2007-06-25: Version 0.0.5rc3v0.0.5rc3
- Updated Finnish translation (Submitted by Rolf Ahrenberg).
- Added quickepgsearch, sport and music plugins in main menu logos (Submitted by zulu @vdr-portal.de).
- Reworked debug() and error().
- Use required width of date for calculation of logo area with.
- Don't let vector for text effects grow when moving through lists in menus.
- Added internal translation of long weeksdays (Requested and translated by Pat @vdr-portal.de).
- Support TrueTypeFonts again with VDR >=v1.5.4 (TTF width setup disabled).
- Read OSD size from VDR's cOsd as suggested in VDR and Avards plugin.
- Minor bugfixes and enhancements.
Diffstat (limited to 'font.c')
-rw-r--r-- | font.c | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -8,13 +8,14 @@ #include "common.h" -#ifdef HAVE_FREETYPE +#if VDRVERSNUM != 10503 #include "font.h" #include <iconv.h> #include <stdio.h> cGraphtftFont::cGraphtftFont() { +#if VDRVERSNUM < 10503 _library = 0; _face = 0; @@ -24,12 +25,14 @@ cGraphtftFont::cGraphtftFont() { error("ERROR: Could not init freetype library"); } +#endif } cGraphtftFont::~cGraphtftFont() { Clear(); +#if VDRVERSNUM < 10503 if (_face) { FT_Done_Face(_face); @@ -39,6 +42,7 @@ cGraphtftFont::~cGraphtftFont() { FT_Done_FreeType(_library); } +#endif } bool cGraphtftFont::Load(string Filename, string CacheName, int Size, int Language, int Width, int format) @@ -46,6 +50,18 @@ bool cGraphtftFont::Load(string Filename, string CacheName, int Size, int Langua if ( _cache.find(CacheName) != _cache.end() ) return true; +#if VDRVERSNUM >= 10504 + //TODO: "Width" not yet in VDR +# ifdef VDRVERSNUM >= 10505 + cFont *newFont = cFont::CreateFont(Filename.c_str(), Size, Width > 0 ? (Size * Width / 100) : 0); +# else + cFont *newFont = cFont::CreateFont(Filename.c_str(), Size); +# endif + if (newFont) { + _cache[CacheName] = newFont; + return true; + } +#elif VDRVERSNUM < 10503 int error = FT_New_Face(_library, Filename.c_str(), format, &_face); // every thing ok? @@ -190,6 +206,8 @@ bool cGraphtftFont::Load(string Filename, string CacheName, int Size, int Langua return true; } delete(font_data); +#endif //VDRVERSNUM >= 10504 + // Something went wrong! return false; } @@ -215,9 +233,11 @@ void cGraphtftFont::Clear() 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 } -#endif //HAVE_FREETYPE +#endif //VDRVERSNUM < 10503 |