From 8cac1bddc49d4f68862c9ab2f3df72009e47487e Mon Sep 17 00:00:00 2001 From: Slipstream Date: Tue, 20 May 2025 20:44:13 -0600 Subject: [PATCH] feat: Update font directory and file for Wordle game board image generation --- cogs/games/wordle_game.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cogs/games/wordle_game.py b/cogs/games/wordle_game.py index 47151bd..f257b12 100644 --- a/cogs/games/wordle_game.py +++ b/cogs/games/wordle_game.py @@ -149,9 +149,9 @@ def generate_board_image(game: WordleGame, used_letters: Set[str] = None) -> dis # Construct path relative to this script file SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PROJECT_ROOT = os.path.dirname(os.path.dirname(SCRIPT_DIR)) # Go up two levels from games dir - FONT_DIR_NAME = "dejavusans" # Directory specified by user - FONT_FILE_NAME = "DejaVuSans.ttf" - font_path = os.path.join(PROJECT_ROOT, FONT_DIR_NAME, FONT_FILE_NAME) + FONT_DIR_NAME = "FONT" # Directory specified by user + FONT_FILE_NAME = "DejaVuSansMono.ttf" + font_path = os.path.join(PROJECT_ROOT, "..", "..", FONT_DIR_NAME, FONT_FILE_NAME) # Try to load the font font = ImageFont.truetype(font_path, size=int(SQUARE_SIZE * 0.6))