summaryrefslogtreecommitdiff
path: root/font.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-10-03 10:34:48 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2000-10-03 10:34:48 +0200
commit6a50f37f25b43112d4a1fad8a5057089548dfc3c (patch)
treec3a28722d1c7b04c12174fe748aead391e7c0ed8 /font.h
parentb4faf3787a24c43b0a22b3ee695374012c992eb2 (diff)
downloadvdr-6a50f37f25b43112d4a1fad8a5057089548dfc3c.tar.gz
vdr-6a50f37f25b43112d4a1fad8a5057089548dfc3c.tar.bz2
Faster OSD by using bitmap
Diffstat (limited to 'font.h')
-rw-r--r--font.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/font.h b/font.h
new file mode 100644
index 00000000..f31c6b59
--- /dev/null
+++ b/font.h
@@ -0,0 +1,40 @@
+/*
+ * font.h: 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.h 1.1 2000/10/01 15:00:35 kls Exp $
+ */
+
+#ifndef __FONT_H
+#define __FONT_H
+
+enum eDvbFont {
+ fontOsd,
+/* TODO as soon as we have the font files...
+ fontTtxSmall,
+ fontTtxLarge,
+*/
+ };
+
+class cFont {
+public:
+ enum { NUMCHARS = 256 };
+ typedef unsigned long tPixelData;
+ struct tCharData {
+ tPixelData width, height;
+ tPixelData lines[1];
+ };
+private:
+ 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]; }
+ };
+
+#endif //__FONT_H