Skip to content

A live bird collage card for your Home Assistant dashboard.

add fonts for Korean and Arabic

frederik0eab5428e47b
diff --git a/homepage/static/NotoSansArabic-Regular.ttf b/homepage/static/NotoSansArabic-Regular.ttf
new file mode 100644
index 00000000..08a5b52d
Binary files /dev/null and b/homepage/static/NotoSansArabic-Regular.ttf differ
diff --git a/homepage/static/NotoSansKR-Regular.ttf b/homepage/static/NotoSansKR-Regular.ttf
new file mode 100644
index 00000000..1b14d324
Binary files /dev/null and b/homepage/static/NotoSansKR-Regular.ttf differ
diff --git a/scripts/daily_plot.py b/scripts/daily_plot.py
index 43a44643..f1ae997c 100755
--- a/scripts/daily_plot.py
+++ b/scripts/daily_plot.py
@@ -189,8 +189,12 @@ def load_fonts():
for font in font_manager.findSystemFonts(font_dir, fontext='ttf'):
font_manager.fontManager.addfont(font)
# Set font family globally
- if conf['DATABASE_LANG'] in ['ja', 'zh']:
+ if conf['DATABASE_LANG'] == 'ar':
+ rcParams['font.family'] = 'Noto Sans Arabic'
+ elif conf['DATABASE_LANG'] in ['ja', 'zh']:
rcParams['font.family'] = 'Noto Sans JP'
+ elif conf['DATABASE_LANG'] == 'ko':
+ rcParams['font.family'] = 'Noto Sans KR'
elif conf['DATABASE_LANG'] == 'th':
rcParams['font.family'] = 'Noto Sans Thai'
else: