diff options
author | Andreas Mair <amair.sob@googlemail.com> | 2010-04-05 12:31:58 +0200 |
---|---|---|
committer | Andreas Mair <amair.sob@googlemail.com> | 2010-04-05 12:31:58 +0200 |
commit | eebfdf1a3d737db58e6d2d3c6945584dd5e5054f (patch) | |
tree | 6a28dcd5ab8c85a14a8957f221d8ef0a5680a7fc /font.c | |
parent | 95977e11c0a5c1170351f2fafe400519d7b1086b (diff) | |
download | vdr-plugin-skinenigmang-eebfdf1a3d737db58e6d2d3c6945584dd5e5054f.tar.gz vdr-plugin-skinenigmang-eebfdf1a3d737db58e6d2d3c6945584dd5e5054f.tar.bz2 |
2010-04-05: Version 0.1.1v0.1.1
- Moved "General / Show progressbar" to "Logos & Symbols / Show progressbar in lists".
- Fixed gcc 4.3 compiler warnings.
- Show "Parental Rating" and "Contents" in EPG and recording details (requires at least VDR 1.7.11).
- Show estimated bitrate and recording format (TS/PES) in recording's details.
- Show subtitle tracks in EPG and recording details.
- Changed defaults for setup options.
- Don't define CLEAR_BUG_WORKAROUND by default.
- Added new setup option "Colored status symbols in EPG details".
- Added new theme "bgw" (Submitted by jlacvdr @gmail.com).
- Added new setup option "Round corners".
- Display cut length and size of recordings in recording's details (based on skinelchi-0.2.1).
- Fixed calculation of channel info OSD areas.
- Check for valid OSD width and height and font size and width.
- Added VDR's default fonts to the TrueTypeFont selector.
- Unselectable rows in menu OSD starting with "---" will be formated as headlines if "Show symbols in lists" is set.
- New "elapsed/remaining" option for "Show remaining/elapsed time" setting.
- New "active only" option for "Show status symbols" setting.
- Added setup option for minimal info area width.
- Restructured setup menu.
Diffstat (limited to 'font.c')
-rw-r--r-- | font.c | 32 |
1 files changed, 19 insertions, 13 deletions
@@ -26,20 +26,26 @@ const cFont* cGraphtftFont::GetFont(const char *Filename, int Size, int Width) if (Filename == NULL) return NULL; + if (Size < MINFONTSIZE) + Size = MINFONTSIZE; + if (Width == 0) + Width = 100; + char *cachename = NULL; - asprintf(&cachename, "%s_%d_%d", Filename, Size, Width); - string CacheName = cachename; - free(cachename); - cachename = NULL; - - if (_cache.find(CacheName) != _cache.end()) - return _cache[CacheName]; - - debug("cGraphtftFont::Load() CREATING FONT %s size=%d width=%d", Filename, Size, Width); - cFont *newFont = cFont::CreateFont(Filename, Size, Width > 0 ? (Size * Width / 100) : 0); - if (newFont) { - _cache[CacheName] = newFont; - return newFont; + if (-1 != asprintf(&cachename, "%s_%d_%d", Filename, Size, Width)) { + string CacheName = cachename; + free(cachename); + cachename = NULL; + + if (_cache.find(CacheName) != _cache.end()) + return _cache[CacheName]; + + debug("cGraphtftFont::Load() CREATING FONT %s size=%d width=%d", Filename, Size, Width); + cFont *newFont = cFont::CreateFont(Filename, Size, Width > 0 ? (Size * Width / 100) : 0); + if (newFont) { + _cache[CacheName] = newFont; + return newFont; + } } error("ERROR: EnigmaNG: Couldn't load font %s:%d", Filename, Size); |