def _wrapped_lines(self, image_map):
def words_fit(words):
words_line = ' '.join(words)
- width = self.font.size(words_line)[0]
+ width = self.font.size(words_line)[0] * EIGHT_BIT_SCALE
if width < self.box_width:
return True
elif len(words) == 1:
x, y = self.padding, self.padding
for line_surface in rendered_lines:
+ if self.centre:
+ x = (width - line_surface.get_rect().width) / 2
+ x += self.padding
self.surface.blit(line_surface, (x, y))
y += line_surface.get_rect().height
for pos, img in image_map.items():