summaryrefslogtreecommitdiff
path: root/dvbsubtitle.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-03-13 15:30:47 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-03-13 15:30:47 +0100
commit2781c337b18f80fc7e9a16c65064c4ef2a47b147 (patch)
tree771db4005d276cb485c2fb79ccfe998a56293ece /dvbsubtitle.c
parent4bc2a502a4d9ecc5469cc035e577953ccd5c9103 (diff)
downloadvdr-2781c337b18f80fc7e9a16c65064c4ef2a47b147.tar.gz
vdr-2781c337b18f80fc7e9a16c65064c4ef2a47b147.tar.bz2
No longer using GetFont() (which is not thread safe) in cSubtitleRegion::UpdateTextData()
Diffstat (limited to 'dvbsubtitle.c')
-rw-r--r--dvbsubtitle.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dvbsubtitle.c b/dvbsubtitle.c
index 9718a5c5..a623df2f 100644
--- a/dvbsubtitle.c
+++ b/dvbsubtitle.c
@@ -7,7 +7,7 @@
* Original author: Marco Schluessler <marco@lordzodiac.de>
* With some input from the "subtitle plugin" by Pekka Virtanen <pekka.virtanen@sci.fi>
*
- * $Id: dvbsubtitle.c 2.28 2012/03/11 13:34:03 kls Exp $
+ * $Id: dvbsubtitle.c 2.29 2012/03/13 15:30:47 kls Exp $
*/
@@ -491,13 +491,14 @@ void cSubtitleRegion::UpdateTextData(cSubtitleClut *Clut)
const cPalette *palette = Clut ? Clut->GetPalette(Depth()) : NULL;
for (cSubtitleObject *so = objects.First(); so && palette; so = objects.Next(so)) {
if (Utf8StrLen(so->TextData()) > 0) {
- const cFont *font = cFont::GetFont(fontOsd);
+ cFont *font = cFont::CreateFont(Setup.FontOsd, Setup.FontOsdSize);
cBitmap *tmp = new cBitmap(font->Width(so->TextData()), font->Height(), Depth());
double factor = (double)lineHeight / font->Height();
tmp->DrawText(0, 0, so->TextData(), palette->Color(so->ForegroundPixelCode()), palette->Color(so->BackgroundPixelCode()), font);
tmp = tmp->Scaled(factor, factor, true);
DrawBitmap(so->X(), so->Y(), *tmp);
DELETENULL(tmp);
+ delete font;
}
}
}