feat: add detailed font type and size logging for debugging

This commit is contained in:
ChuckBuilds
2025-04-23 14:39:19 -05:00
parent 6577565bd6
commit 4da42236f6
2 changed files with 4 additions and 2 deletions

View File

@@ -129,8 +129,8 @@ class CalendarManager:
# Use display manager's small font for date/time and calendar font for summary
datetime_font = self.display_manager.small_font
summary_font = self.display_manager.calendar_font
logger.debug(f"Using datetime font: {datetime_font}")
logger.debug(f"Using summary font: {summary_font}")
logger.debug(f"Using datetime font: {datetime_font} (type: {type(datetime_font)})")
logger.debug(f"Using summary font: {summary_font} (type: {type(summary_font)})")
available_width = self.display_manager.matrix.width - 4 # Leave 2 pixel margin on each side
# Draw date and time on top line

View File

@@ -157,6 +157,8 @@ class DisplayManager:
logger.info(f"Attempting to load tom-thumb font from: {font_path}")
self.calendar_font = ImageFont.load(font_path)
logger.info(f"tom-thumb calendar font loaded successfully from {font_path}")
logger.info(f"Calendar font type: {type(self.calendar_font)}")
logger.info(f"Calendar font size: {self.calendar_font.size}")
except Exception as font_err:
logger.error(f"Failed to load tom-thumb font: {font_err}. Falling back to small font.")
self.calendar_font = self.small_font