Version 2.2
[librarian.git] / src / librarian / cover.py
index 7d7964d..8f7b656 100644 (file)
@@ -68,6 +68,10 @@ class TextBox(object):
                     line_width = self.max_text_width
                     break
                 line = parts[0]
                     line_width = self.max_text_width
                     break
                 line = parts[0]
+
+                if line[-2] == ' ':
+                    line = line[:-2]
+
                 line_width = self.draw.textsize(line, font=font)[0]
             line = line.strip() + ' '
 
                 line_width = self.draw.textsize(line, font=font)[0]
             line = line.strip() + ' '