Added cFont::Width(void) to get the default character width and allow stretched font drawing in high level OSDs

This commit is contained in:
Klaus Schmidinger
2016-12-22 12:53:09 +01:00
parent f91468ff9b
commit b6080634cc
6 changed files with 26 additions and 8 deletions

View File

@@ -130,3 +130,8 @@ VDR Plugin 'skincurses' Revision History
2015-02-19: Version 2.2.0
- Official release.
2016-12-22: Version 2.3.2
- Added cFont::Width(void) to get the default character width and allow stretched
font drawing in high level OSDs (dummy for skincurses).

View File

@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: skincurses.c 3.3 2015/02/17 13:13:17 kls Exp $
* $Id: skincurses.c 4.1 2016/12/22 12:50:20 kls Exp $
*/
#include <ncurses.h>
@@ -12,7 +12,7 @@
#include <vdr/skins.h>
#include <vdr/videodir.h>
static const char *VERSION = "2.2.0";
static const char *VERSION = "2.3.2";
static const char *DESCRIPTION = trNOOP("A text only skin");
static const char *MAINMENUENTRY = NULL;
@@ -20,6 +20,7 @@ static const char *MAINMENUENTRY = NULL;
class cCursesFont : public cFont {
public:
virtual int Width(void) const { return 1; }
virtual int Width(uint c) const { return 1; }
virtual int Width(const char *s) const { return s ? Utf8StrLen(s) : 0; }
virtual int Height(void) const { return 1; }