Refactor code structure for improved readability and maintainability
This commit is contained in:
parent
8cac1bddc4
commit
6c39bec4f7
BIN
FONT/DejaVuSans.ttf
Normal file
BIN
FONT/DejaVuSans.ttf
Normal file
Binary file not shown.
@ -150,8 +150,9 @@ def generate_board_image(game: WordleGame, used_letters: Set[str] = None) -> dis
|
||||
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 = "FONT" # Directory specified by user
|
||||
FONT_FILE_NAME = "DejaVuSansMono.ttf"
|
||||
FONT_FILE_NAME = "DejaVuSans.ttf"
|
||||
font_path = os.path.join(PROJECT_ROOT, "..", "..", FONT_DIR_NAME, FONT_FILE_NAME)
|
||||
print(f"Font path: {font_path}")
|
||||
|
||||
# Try to load the font
|
||||
font = ImageFont.truetype(font_path, size=int(SQUARE_SIZE * 0.6))
|
||||
|
Loading…
x
Reference in New Issue
Block a user