A live bird collage card for your Home Assistant dashboard.
fix: use a font that can actually render the characters
frederik2c4fe69505d5
diff --git a/homepage/static/NotoSansJP-Regular.ttf b/homepage/static/NotoSansJP-Regular.ttfnew file mode 100644index 00000000..1583096aBinary files /dev/null and b/homepage/static/NotoSansJP-Regular.ttf differdiff --git a/homepage/static/NotoSansThai-Regular.ttf b/homepage/static/NotoSansThai-Regular.ttfnew file mode 100644index 00000000..638e709bBinary files /dev/null and b/homepage/static/NotoSansThai-Regular.ttf differdiff --git a/scripts/daily_plot.py b/scripts/daily_plot.pyindex 0ac2abc9..805cd684 100755--- a/scripts/daily_plot.py+++ b/scripts/daily_plot.py@@ -13,7 +13,7 @@ import seaborn as snsfrom matplotlib import rcParamsfrom matplotlib.colors import LogNorm-from utils.helpers import DB_PATH+from utils.helpers import DB_PATH, get_settingsdef get_data(now=None):@@ -150,12 +150,18 @@ def create_plot(df_plt_today, now, is_top=None):def load_fonts():+ conf = get_settings()# Add every font at the specified locationfont_dir = [os.path.expanduser('~/BirdNET-Pi/homepage/static')]for font in font_manager.findSystemFonts(font_dir, fontext='ttf'):font_manager.fontManager.addfont(font)# Set font family globally- rcParams['font.family'] = 'Roboto Flex'+ if conf['DATABASE_LANG'] in ['ja', 'zh']:+ rcParams['font.family'] = 'Noto Sans JP'+ elif conf['DATABASE_LANG'] == 'th':+ rcParams['font.family'] = 'Noto Sans Thai'+ else:+ rcParams['font.family'] = 'Roboto Flex'def main(daemon, sleep_m):