From 89ce33ebc9e79ff5fa2266d5f0063ece30950360 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 27 Dec 2011 15:00:26 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/__init__.py b/src/calibre/ebooks/__init__.py index a1026e97d6..084b91430f 100644 --- a/src/calibre/ebooks/__init__.py +++ b/src/calibre/ebooks/__init__.py @@ -240,7 +240,7 @@ def generate_masthead(title, output_path=None, width=600, height=60): font = ImageFont.truetype(font_path, 48) except: font = ImageFont.truetype(default_font, 48) - text = title.encode('utf-8') + text = title.encode('utf-8') if isinstance(title, unicode) else title width, height = draw.textsize(text, font=font) left = max(int((width - width)/2.), 0) top = max(int((height - height)/2.), 0)