From 330cc5ff3beb7beca2085bd35803f18a66a4f56e Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 2 Jul 2013 20:48:37 +0200 Subject: [PATCH] fix missing space i.e. for: ox.image.wrapText("VERTEIDIGUNG DER ZEIT", 608, 2, "./data/MontserratBold.ttf", 48) --- ox/image.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ox/image.py b/ox/image.py index 96a228f..a703070 100644 --- a/ox/image.py +++ b/ox/image.py @@ -215,7 +215,7 @@ def wrapText(text, max_width, max_lines, font_file, font_size): break else: # word does not fit in one line - lines[line] += ' ' + #lines[line] += ' ' chars = list(word) for char in chars: line = len(lines) - 1 @@ -236,4 +236,6 @@ def wrapText(text, max_width, max_lines, font_file, font_size): while get_width(test) > max_width: test = test[:-2] + ellipsis lines[line] = test + lines[line] += ' ' + return lines