diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-05-31 14:09:52 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-05-31 14:09:52 +0200 |
commit | d6f2f1675c57cb067c7d1c1815b871d1acc2fe19 (patch) | |
tree | da310e344561f7f57ae342a78746cf2d0ec540bc /font.c | |
parent | e056cae8921a68704bf1a0cb4babcdf60d31be2d (diff) | |
download | vdr-d6f2f1675c57cb067c7d1c1815b871d1acc2fe19.tar.gz vdr-d6f2f1675c57cb067c7d1c1815b871d1acc2fe19.tar.bz2 |
Made some functions of cFont virtual to allow implementing dummy fonts for the 'curses' skin
Diffstat (limited to 'font.c')
-rw-r--r-- | font.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: font.c 1.7 2004/05/16 10:50:59 kls Exp $ + * $Id: font.c 1.8 2004/05/31 14:09:00 kls Exp $ */ #include "config.h" @@ -54,9 +54,13 @@ cFont::cFont(void *Data) void cFont::SetData(void *Data) { - height = ((tCharData *)Data)->height; - for (int i = 0; i < NUMCHARS; i++) - data[i] = (tCharData *)&((tPixelData *)Data)[(i < 32 ? 0 : i - 32) * (height + 2)]; + if (Data) { + height = ((tCharData *)Data)->height; + for (int i = 0; i < NUMCHARS; i++) + data[i] = (tCharData *)&((tPixelData *)Data)[(i < 32 ? 0 : i - 32) * (height + 2)]; + } + else + height = 0; } int cFont::Width(const char *s) const |