fnp
/
librarian.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9f77884
)
Avoid hanging conjunction on covers.
author
Radek Czajka
<rczajka@rczajka.pl>
Thu, 7 Oct 2021 10:03:48 +0000
(12:03 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Thu, 7 Oct 2021 10:03:48 +0000
(12:03 +0200)
src/librarian/cover.py
patch
|
blob
|
history
diff --git
a/src/librarian/cover.py
b/src/librarian/cover.py
index
7d7964d
..
8f7b656
100644
(file)
--- a/
src/librarian/cover.py
+++ b/
src/librarian/cover.py
@@
-68,6
+68,10
@@
class TextBox(object):
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() + ' '