Fixed float bug
This commit is contained in:
parent
8f2e4c1c19
commit
59cade023c
2 changed files with 2 additions and 2 deletions
|
@ -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))
|
|
@ -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)))
|
Loading…
Reference in a new issue