From ae2d55ccb56e2634956ada31b51fbee9879cf837 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 23 May 2023 13:11:44 +0200 Subject: [PATCH] Bugfix --- src/librarian/cover.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librarian/cover.py b/src/librarian/cover.py index b60ec34..4fd3d45 100644 --- a/src/librarian/cover.py +++ b/src/librarian/cover.py @@ -72,7 +72,7 @@ class TextBox(object): break line = parts[0] - if line[-2] == ' ': + if len(line) > 2 and line[-2] == ' ': line = line[:-2] line_width = self.draw.textsize(line, font=font)[0] -- 2.20.1