mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-12 05:42:59 +00:00
separate x and y logic for bdf placement
This commit is contained in:
@@ -186,7 +186,9 @@ class OfTheDayManager:
|
|||||||
byte = bitmap.buffer[byte_index]
|
byte = bitmap.buffer[byte_index]
|
||||||
# Check if the specific bit is set
|
# Check if the specific bit is set
|
||||||
if byte & (1 << (7 - (j % 8))):
|
if byte & (1 << (7 - (j % 8))):
|
||||||
draw.point((x + j, y + i), fill=color)
|
draw_y = y - face.glyph.bitmap_top + i
|
||||||
|
draw_x = x + face.glyph.bitmap_left + j
|
||||||
|
draw.point((draw_x, draw_y), fill=color)
|
||||||
except IndexError:
|
except IndexError:
|
||||||
logger.warning(f"Index out of range for char '{char}' at position ({i}, {j})")
|
logger.warning(f"Index out of range for char '{char}' at position ({i}, {j})")
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user