mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-12 21:43:00 +00:00
fix: reduce font change logging spam by only logging when font actually changes
This commit is contained in:
@@ -192,10 +192,14 @@ class DisplayManager:
|
|||||||
# Select font based on parameters
|
# Select font based on parameters
|
||||||
if font:
|
if font:
|
||||||
current_font = font
|
current_font = font
|
||||||
logger.debug(f"Using custom font: {font}")
|
if not hasattr(self, '_last_font') or self._last_font != font:
|
||||||
|
logger.debug(f"Using custom font: {font}")
|
||||||
|
self._last_font = font
|
||||||
else:
|
else:
|
||||||
current_font = self.small_font if small_font else self.regular_font
|
current_font = self.small_font if small_font else self.regular_font
|
||||||
logger.debug(f"Using {'small' if small_font else 'regular'} font: {current_font}")
|
if not hasattr(self, '_last_font') or self._last_font != current_font:
|
||||||
|
logger.debug(f"Using {'small' if small_font else 'regular'} font: {current_font}")
|
||||||
|
self._last_font = current_font
|
||||||
|
|
||||||
# Calculate x position if not provided (center text)
|
# Calculate x position if not provided (center text)
|
||||||
if x is None:
|
if x is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user