From dd0905ad3f1d4811bf3949920d597d0f05dd38d0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 20 Feb 2010 13:05:15 -0700 Subject: [PATCH] ... --- src/calibre/web/feeds/news.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/web/feeds/news.py b/src/calibre/web/feeds/news.py index 5b2bb99022..8b1757371d 100644 --- a/src/calibre/web/feeds/news.py +++ b/src/calibre/web/feeds/news.py @@ -933,7 +933,6 @@ class BasicNewsRecipe(Recipe): except ImportError: import Image, ImageDraw, ImageFont font_path = P('fonts/liberation/LiberationSerif-Bold.ttf') - font = ImageFont.truetype(font_path, 48) title = self.title if isinstance(self.title, unicode) else \ self.title.decode(preferred_encoding, 'replace') date = strftime(self.timefmt) @@ -943,6 +942,7 @@ class BasicNewsRecipe(Recipe): img = Image.new('RGB', (COVER_WIDTH, COVER_HEIGHT), 'white') draw = ImageDraw.Draw(img) # Title + font = ImageFont.truetype(font_path, 44) width, height = draw.textsize(title, font=font) left = max(int((COVER_WIDTH - width)/2.), 0) top = 15