summaryrefslogtreecommitdiff
path: root/font.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2009-05-03 17:15:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2009-05-03 17:15:00 +0200
commit991eda006700f1703bcec528c1ff178a4cab9048 (patch)
tree11f216938606e63027bc717e3d36668df646f474 /font.c
parent733a2becc44a02daf10b97d24b8a9c8b00de3964 (diff)
downloadvdr-patch-lnbsharing-991eda006700f1703bcec528c1ff178a4cab9048.tar.gz
vdr-patch-lnbsharing-991eda006700f1703bcec528c1ff178a4cab9048.tar.bz2
Version 1.7.7vdr-1.7.7
- The new function cDevice::GetVideoSize() returns the size and aspect ratio of the video material currently displayed. This function is used to determine the proper size of the OSD. Plugin authors should implement this function in classes derived from cDevice, if they are able to replay video. - The OSD and font sizes are now defined in percent of the actual video display size. The maximum OSD size has been raised to 1920x1080, to allow full screen OSD on HD systems. - The OSD size is now automatically adjusted to the actual video display (provided the output device implements the GetVideoSize() function). - cFrameDetector::Analyze() now syncs on the TS packet sync bytes (thanks to Oliver Endriss for reporting broken index generation after a buffer overflow).
Diffstat (limited to 'font.c')
-rw-r--r--font.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/font.c b/font.c
index f962a09..3fa97df 100644
--- a/font.c
+++ b/font.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: font.c 2.1 2008/05/02 16:16:51 kls Exp $
+ * $Id: font.c 2.2 2009/05/03 11:15:39 kls Exp $
*/
#include "font.h"
@@ -145,7 +145,7 @@ cFreetypeFont::cFreetypeFont(const char *Name, int CharHeight, int CharWidth)
0, // horizontal device resolution
0); // vertical device resolution
if (!error) {
- height = ((face->size->metrics.ascender-face->size->metrics.descender) + 63) / 64;
+ height = (face->size->metrics.ascender - face->size->metrics.descender + 63) / 64;
bottom = abs((face->size->metrics.descender - 63) / 64);
}
else
@@ -328,7 +328,7 @@ cFont *cFont::fonts[eDvbFontSize] = { NULL };
void cFont::SetFont(eDvbFont Font, const char *Name, int CharHeight)
{
- cFont *f = CreateFont(Name, CharHeight);
+ cFont *f = CreateFont(Name, min(max(CharHeight, MINFONTSIZE), MAXFONTSIZE));
if (!f || !f->Height())
f = new cDummyFont;
delete fonts[Font];