diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2003-10-24 12:53:12 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2003-10-24 12:53:12 +0200 |
commit | c94570e69dfca940ba04829debb93e421f77c4f0 (patch) | |
tree | 26488bf901cb4e7a2b30db914086cb0f45dd2349 /font.h | |
parent | 2b29a5ce367d464fd10d6014990c881eccf5207e (diff) | |
download | vdr-c94570e69dfca940ba04829debb93e421f77c4f0.tar.gz vdr-c94570e69dfca940ba04829debb93e421f77c4f0.tar.bz2 |
Changed font handling to allow language specific character sets; adopted the small font character set from the "Elchi" patch
Diffstat (limited to 'font.h')
-rw-r--r-- | font.h | 34 |
1 files changed, 23 insertions, 11 deletions
@@ -4,19 +4,24 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: font.h 1.2 2000/11/18 14:51:45 kls Exp $ + * $Id: font.h 1.3 2003/10/24 12:52:46 kls Exp $ */ #ifndef __FONT_H #define __FONT_H +#include <stdlib.h> + enum eDvbFont { fontOsd, fontFix, -/* TODO as soon as we have the font files... - fontTtxSmall, - fontTtxLarge, -*/ + fontSml +#define eDvbFontSize (fontSml + 1) + }; + +enum eDvbCode { + code_iso8859_1, +#define eDvbCodeSize (code_iso8859_1 + 1) }; class cFont { @@ -28,14 +33,21 @@ public: tPixelData lines[1]; }; private: + static eDvbCode code; + static cFont *fonts[]; const tCharData *data[NUMCHARS]; public: - cFont(eDvbFont Font); - int Width(unsigned char c) { return data[c]->width; } - int Width(const char *s); - int Height(unsigned char c) { return data[c]->height; } - int Height(const char *s); - const tCharData *CharData(unsigned char c) { return data[c]; } + cFont(void *Data); + void SetData(void *Data); + int Width(unsigned char c) const { return data[c]->width; } + int Width(const char *s) const; + int Height(unsigned char c) const { return data[c]->height; } + int Height(const char *s) const; + const tCharData *CharData(unsigned char c) const { return data[c]; } + static bool SetCode(const char *Code); + static void SetCode(eDvbCode Code); + static void SetFont(eDvbFont Font, void *Data = NULL); + static const cFont *GetFont(eDvbFont Font); }; #endif //__FONT_H |