mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +00:00
Update display_manager.py
font resize
This commit is contained in:
@@ -62,7 +62,7 @@ class DisplayManager:
|
|||||||
|
|
||||||
# Initialize font
|
# Initialize font
|
||||||
try:
|
try:
|
||||||
self.font = ImageFont.truetype("DejaVuSans.ttf", 14)
|
self.font = ImageFont.truetype("DejaVuSans.ttf", 7) # Reduced to match new size
|
||||||
logger.info("Font initialized successfully")
|
logger.info("Font initialized successfully")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Failed to load font: {e}")
|
logger.error(f"Failed to load font: {e}")
|
||||||
@@ -128,8 +128,8 @@ class DisplayManager:
|
|||||||
font_path = "assets/fonts/PressStart2P-Regular.ttf"
|
font_path = "assets/fonts/PressStart2P-Regular.ttf"
|
||||||
|
|
||||||
# For 32px height matrix, optimized sizes for pixel-perfect display
|
# For 32px height matrix, optimized sizes for pixel-perfect display
|
||||||
large_size = 16 # Good size for time display
|
large_size = 7 # Reduced from 16 for better fit
|
||||||
small_size = 8 # Perfect for secondary information
|
small_size = 5 # Reduced from 8 for better fit
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.font = ImageFont.truetype(font_path, large_size)
|
self.font = ImageFont.truetype(font_path, large_size)
|
||||||
|
|||||||
Reference in New Issue
Block a user