From 19f5191a5dccec3679b9202329862d54c8de78af Mon Sep 17 00:00:00 2001 From: Chuck <33324927+ChuckBuilds@users.noreply.github.com> Date: Wed, 23 Jul 2025 13:01:33 -0500 Subject: [PATCH] attacking bdf baseline issue --- src/of_the_day_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/of_the_day_manager.py b/src/of_the_day_manager.py index 8715fc68..ae2e50f9 100644 --- a/src/of_the_day_manager.py +++ b/src/of_the_day_manager.py @@ -171,13 +171,15 @@ class OfTheDayManager: for char in text: face.load_char(char) bitmap = face.glyph.bitmap + # Use bitmap_top to properly position the glyph relative to baseline + glyph_y = y + face.glyph.bitmap_top for i in range(bitmap.rows): for j in range(bitmap.width): byte_index = i * bitmap.pitch + (j // 8) if byte_index < len(bitmap.buffer): byte = bitmap.buffer[byte_index] if byte & (1 << (7 - (j % 8))): - draw.point((x + j, y + i), fill=color) + draw.point((x + j, glyph_y - i), fill=color) x += face.glyph.advance.x >> 6 return x - orig_x