From f44f1c8893bbd7127ffde8186514ae1bea944d33 Mon Sep 17 00:00:00 2001 From: lordjaxom Date: Tue, 28 Dec 2004 14:35:54 +0000 Subject: - implemented font width handling --- font.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'font.c') diff --git a/font.c b/font.c index 4a77395..134e097 100644 --- a/font.c +++ b/font.c @@ -1,5 +1,5 @@ /* - * $Id: font.c,v 1.1 2004/12/19 22:03:13 lordjaxom Exp $ + * $Id: font.c,v 1.2 2004/12/28 14:35:54 lordjaxom Exp $ */ #include "font.h" @@ -18,7 +18,8 @@ cText2SkinFont::~cText2SkinFont() { } -const cFont *cText2SkinFont::Load(const std::string &Path, const std::string &Filename, int Size) +const cFont *cText2SkinFont::Load(const std::string &Path, const std::string &Filename, int Size, + int Width) { if (Filename == "Osd") return cFont::GetFont(fontOsd); @@ -30,9 +31,9 @@ const cFont *cText2SkinFont::Load(const std::string &Path, const std::string &Fi const cFont *res = NULL; #ifdef HAVE_FREETYPE char *cachename; - asprintf(&cachename, "%s_%d_%d", Filename.c_str(), Size, Setup.OSDLanguage); + asprintf(&cachename, "%s_%d_%d_%d", Filename.c_str(), Size, Width, Setup.OSDLanguage); Dprintf("trying now: %s %s\n", (Path + "/" + Filename).c_str(), cachename); - if (mFontCache.Load(Path + "/" + Filename, cachename, Size, Setup.OSDLanguage)) + if (mFontCache.Load(Path + "/" + Filename, cachename, Size, Setup.OSDLanguage, Width)) res = mFontCache.GetFont(cachename); else esyslog("ERROR: Text2Skin: Couldn't load font %s:%d", Filename.c_str(), Size); -- cgit v1.2.3