From 6c5f2c5c64844599c394bb02ac09d2ed4f223c8d Mon Sep 17 00:00:00 2001 From: Chuck <33324927+ChuckBuilds@users.noreply.github.com> Date: Wed, 23 Jul 2025 13:13:40 -0500 Subject: [PATCH] baseline shift --- src/of_the_day_manager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/of_the_day_manager.py b/src/of_the_day_manager.py index 09c26649..2796e203 100644 --- a/src/of_the_day_manager.py +++ b/src/of_the_day_manager.py @@ -175,10 +175,10 @@ class OfTheDayManager: for char in text: face.load_char(char) bitmap = face.glyph.bitmap - # For LED matrix displays, we need pixel-perfect baseline rendering - # Use the glyph's bitmap_top to position relative to the baseline - # This ensures all characters align properly regardless of their height - glyph_y = y + face.glyph.bitmap_top - bitmap.rows + # For bottom baseline alignment, we need to position glyphs so their bottoms align + # bitmap_top gives us the distance from baseline to top of bitmap + # For bottom alignment, we want the bottom of each glyph at the same y position + glyph_y = y - bitmap.rows for i in range(bitmap.rows): for j in range(bitmap.width): byte_index = i * bitmap.pitch + (j // 8)