From 8547f2e5718bfbb3328d700fe2c21d2ec5962500 Mon Sep 17 00:00:00 2001 From: meetwq Date: Sat, 30 Nov 2024 12:40:59 +0800 Subject: [PATCH] update --- .github/workflows/update.yml | 2 +- memes/operator_generator/__init__.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index a8b6f64..0db56c1 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -37,7 +37,7 @@ jobs: - name: Install fonts run: | - sudo apt install fonts-noto-color-emoji + sudo apt install fonts-noto-color-emoji libgl1-mesa-glx libgl1-mesa-dri sudo mkdir /usr/share/fonts/myfonts sudo cp main/resources/fonts/* /usr/share/fonts/myfonts/ fc-cache -fv diff --git a/memes/operator_generator/__init__.py b/memes/operator_generator/__init__.py index d0b04af..5817202 100644 --- a/memes/operator_generator/__init__.py +++ b/memes/operator_generator/__init__.py @@ -17,11 +17,12 @@ def operator_generator(images: list[BuildImage], texts: list[str], args): frame.draw_text( (120, 0, 620, 100), f"{name},你的干员信息如下:", - fontsize=80, + max_fontsize=80, + min_fontsize=30, fill="white", stroke_fill="black", stroke_ratio=0.1, - weight="bold", + font_style="bold", allow_wrap=True, lines_align="center", )