summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-11-11 14:05:53 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2017-11-11 14:05:53 +0100
commit54b721ebde9c3735a322f13f0e6e7ca24f0c1794 (patch)
treea197d7a8b138cc9ef9fca10eb5342305327abc1e
parentd19a3fc3b8e1cd492b756f9adef25805ac5177e6 (diff)
downloadvdr-54b721ebde9c3735a322f13f0e6e7ca24f0c1794.tar.gz
vdr-54b721ebde9c3735a322f13f0e6e7ca24f0c1794.tar.bz2
Added some comments regarding font height
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY1
-rw-r--r--font.h14
3 files changed, 11 insertions, 5 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index d6f9c54d..0711b5bf 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -3374,6 +3374,7 @@ Thomas Reufer <thomas@reufer.ch>
font drawing in high level OSDs
for fixing regenerating the index of audio recordings
for implementing the SVDRP commands 'LSTD' and 'PRIM'
+ for adding some comments regarding font height
Eike Sauer <EikeSauer@t-online.de>
for reporting a problem with channels that need more than 5 TS packets for detecting
diff --git a/HISTORY b/HISTORY
index 081c3331..ddd9044a 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9198,3 +9198,4 @@ Video Disk Recorder Revision History
removed), but rather by the main program loop reacting to changes in Setup.PrimaryDVB.
- The new SVDRP commands 'LSTD' and 'PRIM' can be used to list all available devices
and to switch the primary device (thanks to Thomas Reufer).
+- Added some comments regarding font height (thanks to Thomas Reufer).
diff --git a/font.h b/font.h
index 9d18bde2..3bdf7e72 100644
--- a/font.h
+++ b/font.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: font.h 4.2 2016/12/22 12:43:24 kls Exp $
+ * $Id: font.h 4.3 2017/11/11 14:05:07 kls Exp $
*/
#ifndef __FONT_H
@@ -54,6 +54,8 @@ public:
///< Returns the width of the given string in pixel.
virtual int Height(void) const = 0;
///< Returns the height of this font in pixel (all characters have the same height).
+ ///< If the font contains descenders, its total height may be higher than the character
+ ///< height specified during creation.
int Height(const char *s) const { return Height(); }
///< Returns the height of this font in pixel (obsolete, just for backwards compatibility).
virtual void DrawText(cBitmap *Bitmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const = 0;
@@ -75,10 +77,12 @@ public:
///< function that called GetFont() has returned.
static cFont *CreateFont(const char *Name, int CharHeight, int CharWidth = 0);
///< Creates a new font object with the given Name and makes its characters
- ///< CharHeight pixels high. If CharWidth is given, it overwrites the font's
- ///< default width. Name is of the form "Family:Style", for instance
- ///< "Verdana:Bold Italic" or "Times New Roman". See GetAvailableFontNames()
- ///< for how to get a list of all available font names.
+ ///< CharHeight pixels high. The actual height of the required drawing area
+ ///< might be higher than CharHeight if the font contains descenders.
+ ///< If CharWidth is given, it overwrites the font's default width.
+ ///< Name is of the form "Family:Style", for instance "Verdana:Bold Italic" or
+ ///< "Times New Roman". See GetAvailableFontNames() for how to get a list of
+ ///< all available font names.
///< If the requested font can't be created, a dummy font is returned.
///< The caller must delete the font when it is no longer needed.
static bool GetAvailableFontNames(cStringList *FontNames, bool Monospaced = false);