vdr/font.c
Klaus Schmidinger ef8fe3f04c Version 0.65
- Modified LIRC interface to better handle repeat function.
- Faster OSD by first writing into a bitmap and then sending the entire bitmap
  to the DVB driver at once (requires the patch 'dvb.c.071.diff' to be applied
  against the version 0.71 DVB driver file 'dvb.c').
- When switching channels the channel is now immediately displayed, and the
  current/next information is shown as soon as it becomes available.
- No longer displaying the year in the 'Recordings' menu to saves space for the
  title.
- The 'Recordings' menu now displays a '*' to indicate new recordings.
- Added the description of the timers.conf file to the FORMATS file (thanks to
  Bastian Guse).
- Displaying as much as possible of the current/next info (dropping characters
  that would display only partially).
- In normal viewing mode the '0' key now toggles between the current and the
  previous channel.
2000-10-03 18:00:00 +02:00

42 lines
768 B
C

/*
* font.c: Font handling for the DVB On Screen Display
*
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: font.c 1.1 2000/10/01 15:01:49 kls Exp $
*/
#include "font.h"
#include "tools.h"
#include "fontosd.c"
cFont::cFont(eDvbFont Font)//XXX
{
switch (Font) {
default:
case fontOsd: for (int i = 0; i < NUMCHARS; i++)
data[i] = (tCharData *)&FontOsd[i < 32 ? 0 : i - 32];
break;
// TODO others...
}
}
int cFont::Width(const char *s)
{
int w = 0;
while (s && *s)
w += Width(*s++);
return w;
}
int cFont::Height(const char *s)
{
int h = 0;
if (s && *s)
h = Height(*s); // all characters have the same height!
return h;
}