From 665e1b4f67028308aa8a3b6f40ce37582b0e0819 Mon Sep 17 00:00:00 2001 From: Chuck <33324927+ChuckBuilds@users.noreply.github.com> Date: Wed, 23 Jul 2025 13:05:20 -0500 Subject: [PATCH] bitmap fonts are outrageous --- src/of_the_day_manager.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/of_the_day_manager.py b/src/of_the_day_manager.py index 9dbddf8e..376f986c 100644 --- a/src/of_the_day_manager.py +++ b/src/of_the_day_manager.py @@ -171,8 +171,10 @@ 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 + # Calculate baseline position + # bitmap_top is the distance from baseline to top of bitmap + baseline_y = y + glyph_y = baseline_y + face.glyph.bitmap_top for i in range(bitmap.rows): for j in range(bitmap.width): byte_index = i * bitmap.pitch + (j // 8)