From 59cade023cb6a7ccc632bdabe657f4d61c7734ca Mon Sep 17 00:00:00 2001 From: Max G Date: Sat, 9 Mar 2019 17:23:30 +0100 Subject: [PATCH] Fixed float bug --- Calendar/TextDesign.py | 2 +- Calendar/TextWraper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Calendar/TextDesign.py b/Calendar/TextDesign.py index faa2d3c..f2e02ba 100644 --- a/Calendar/TextDesign.py +++ b/Calendar/TextDesign.py @@ -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) \ No newline at end of file + return ImageFont.truetype(path + self.font_family, int(self.font_size)) \ No newline at end of file diff --git a/Calendar/TextWraper.py b/Calendar/TextWraper.py index ef529a4..b480a36 100644 --- a/Calendar/TextWraper.py +++ b/Calendar/TextWraper.py @@ -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)) \ No newline at end of file + return wrap_text_with_font(text, width, ImageFont.truetype(path + font_family, int(font_size))) \ No newline at end of file