From 7d0b38c4794e039064e1994a587b8dc65fa65306 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 8 Apr 2019 16:06:56 +0200 Subject: [PATCH] Reset default values --- Calendar/TextDesign.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Calendar/TextDesign.py b/Calendar/TextDesign.py index 734fa12..292a594 100644 --- a/Calendar/TextDesign.py +++ b/Calendar/TextDesign.py @@ -1,6 +1,6 @@ from DesignEntity import DesignEntity from PIL import ImageFont, ImageDraw, ImageOps -from Assets import path, defaultfont, colors +from Assets import path, defaultfont, colors, defaultfontsize from TextWraper import wrap_text_with_font paddingcorrection = -3 @@ -9,10 +9,8 @@ truncateerror_fontsize = 0.5 class TextDesign (DesignEntity): """Object that manages all information relevant to text and prints it to an image""" - def __init__ (self, size, color=colors["fg"], background_color=colors["bg"], font = None, fontsize = 12, text = "", horizontalalignment = "left", verticalalignment = "top", mask=True, truncate=False, truncate_suffix = '...', wrap=False): + def __init__ (self, size, color=colors["fg"], background_color=colors["bg"], font = defaultfont, fontsize = defaultfontsize, text = "", horizontalalignment = "left", verticalalignment = "top", mask=True, truncate=False, truncate_suffix = '...', wrap=False): super(TextDesign, self).__init__(size, mask = mask) - if font is None: - font = defaultfont self.font_family = font self.font_size = fontsize self.text = text