Fixed float bug

This commit is contained in:
Maximilian Giller 2019-03-09 17:23:30 +01:00
parent 8f2e4c1c19
commit 59cade023c
2 changed files with 2 additions and 2 deletions

View file

@ -66,4 +66,4 @@ class TextDesign (DesignEntity):
self.text = wrap_text_with_font(self.text, self.size[0], self.__font__)
def __get_font__(self):
return ImageFont.truetype(path + self.font_family, self.font_size)
return ImageFont.truetype(path + self.font_family, int(self.font_size))

View file

@ -15,4 +15,4 @@ def wrap_text_with_font (text, width, font):
return result.strip()
def wrap_text (text, width, font_size, font_family = defaultfont):
return wrap_text_with_font(text, width, ImageFont.truetype(path + font_family, font_size))
return wrap_text_with_font(text, width, ImageFont.truetype(path + font_family, int(font_size)))