From 597d25df63b00429fc36e14c14b732bd83fbce5f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 18 Feb 2024 21:55:57 +0000 Subject: [PATCH 1/2] Bump pillow from 10.0.1 to 10.2.0 in /base Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.2.0. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) - [Commits](https://github.com/python-pillow/Pillow/compare/10.0.1...10.2.0) --- updated-dependencies: - dependency-name: pillow dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- base/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/requirements.txt b/base/requirements.txt index 1367a034..a5c1aebe 100644 --- a/base/requirements.txt +++ b/base/requirements.txt @@ -1,4 +1,4 @@ click==8.1.3 ndspy==4.1.0 -Pillow==10.0.1 +Pillow==10.2.0 zed @ git+https://github.com/phst-randomizer/zed.git@5ee969236bf3c3d0707da963e5edc818ddf246d3 From ffde6a7431e6c21d266c9a5d6377082a3a83778d Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 1 Apr 2024 21:14:13 -0400 Subject: [PATCH 2/2] Fix breaking change in default pillow font --- base/data/_title_screen.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/base/data/_title_screen.py b/base/data/_title_screen.py index 08f0aea3..8485b773 100644 --- a/base/data/_title_screen.py +++ b/base/data/_title_screen.py @@ -47,19 +47,16 @@ def insert_title_screen( if version_string: draw = ImageDraw.Draw(img) + draw.fontmode = '1' # disable anti-aliasing on text + + # Calculate size/location to put version string img_width, img_height = img.size - _, _, text_width, text_height = draw.textbbox((0, 0), version_string) + _, _, text_width, text_height = draw.textbbox(xy=(0, 0), text=version_string, font_size=10) x = img_width - text_width - 2 - y = img_height - text_height - - # draw rectangle to go behind text - draw.rectangle( - (x - 4, y - 2, x + text_width + 3, y + text_height), - fill=(209, 36, 37), - ) + y = img_height - text_height - 2 # draw text - draw.text((x, y), version_string, fill=(20, 68, 115), stroke_width=4, stroke_fill=(0, 0, 0)) + draw.text((x, y), version_string, fill=(20, 68, 115), font_size=10) image_data = AutoList() palette_data: list[tuple[int, int, int]] = []