diff --git a/CONTRIBUTORS b/CONTRIBUTORS index d6f9c54d..0711b5bf 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3374,6 +3374,7 @@ Thomas Reufer 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 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);