mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +00:00
changed font path for 4x6
This commit is contained in:
@@ -130,12 +130,12 @@ class DisplayManager:
|
|||||||
self.small_font = ImageFont.truetype("assets/fonts/PressStart2P-Regular.ttf", 8)
|
self.small_font = ImageFont.truetype("assets/fonts/PressStart2P-Regular.ttf", 8)
|
||||||
logger.info("Press Start 2P small font loaded successfully")
|
logger.info("Press Start 2P small font loaded successfully")
|
||||||
|
|
||||||
# Add an even smaller font using 4x6.bdf
|
# Add an even smaller font using 4x6.bdf from the rpi-rgb-led-matrix library fonts
|
||||||
try:
|
try:
|
||||||
# Get directory containing this script
|
# Get directory containing this script
|
||||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
# Construct path relative to this script
|
# Construct path relative to this script to the library's font
|
||||||
relative_font_path = os.path.join(script_dir, "../assets/fonts/4x6.bdf")
|
relative_font_path = os.path.join(script_dir, "../rpi-rgb-led-matrix-master/fonts/4x6.bdf")
|
||||||
# Normalize to absolute path
|
# Normalize to absolute path
|
||||||
font_path = os.path.abspath(relative_font_path)
|
font_path = os.path.abspath(relative_font_path)
|
||||||
print(f"Attempting to load font from (normalized absolute): {font_path}") # DEBUG PRINT
|
print(f"Attempting to load font from (normalized absolute): {font_path}") # DEBUG PRINT
|
||||||
|
|||||||
Reference in New Issue
Block a user