From 339a47fd30d1dee2f85e2beaa9cb0c20f273f4fb Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 31 May 2024 10:12:33 +0200 Subject: [PATCH] make font configurable --- contactform/app.py | 2 +- contactform/config.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/contactform/app.py b/contactform/app.py index 3b3af4e..3572c8a 100644 --- a/contactform/app.py +++ b/contactform/app.py @@ -70,7 +70,7 @@ Font(family="IBM Plex Sans", style="Bold"), Font(family="Source Code Pro", style="Bold"), ], - default_font=Font(family="Source Code Pro", style="Bold"), + default_font=Font(family=config.LABEL_FONT_FAMILY, style=config.LABEL_FONT_STYLE), ), website=WebsiteConfiguration, ) diff --git a/contactform/config.py b/contactform/config.py index d470e77..9f59c66 100644 --- a/contactform/config.py +++ b/contactform/config.py @@ -33,6 +33,8 @@ def __init__(self): self.CONFIG_FILE_PATH = self.get_env_var("CONFIG_FILE_PATH", "config.json") self.BASIC_AUTH_USERNAME = self.get_env_var("BASIC_AUTH_USERNAME") self.BASIC_AUTH_PASSWORD = self.get_env_var("BASIC_AUTH_PASSWORD") + self.LABEL_FONT_FAMILY = self.get_env_var("LABEL_FONT_FAMILY","DejaVu Sans") + self.LABEL_FONT_STYLE = self.get_env_var("LABEL_FONT_STYLE","Book") self.TAG_ID = None self.CAMPAIGN_ID = None self.SOURCE_ID = None