mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 05:13:01 +00:00
change OTD font
This commit is contained in:
@@ -170,13 +170,13 @@ class OfTheDayManager:
|
|||||||
|
|
||||||
self.display_manager.draw_text(title, 1, 0,
|
self.display_manager.draw_text(title, 1, 0,
|
||||||
color=self.title_color,
|
color=self.title_color,
|
||||||
font=self.display_manager.extra_small_font)
|
font=self.display_manager.calendar_font)
|
||||||
|
|
||||||
# Draw subtitle right below title - left justified
|
# Draw subtitle right below title - left justified
|
||||||
if subtitle:
|
if subtitle:
|
||||||
# Use full width minus 2 pixels for maximum text
|
# Use full width minus 2 pixels for maximum text
|
||||||
available_width = self.display_manager.matrix.width - 2
|
available_width = self.display_manager.matrix.width - 2
|
||||||
wrapped_lines = self._wrap_text(subtitle, available_width, self.display_manager.extra_small_font, max_lines=1)
|
wrapped_lines = self._wrap_text(subtitle, available_width, self.display_manager.calendar_font, max_lines=1)
|
||||||
|
|
||||||
for i, line in enumerate(wrapped_lines):
|
for i, line in enumerate(wrapped_lines):
|
||||||
if line.strip():
|
if line.strip():
|
||||||
@@ -186,13 +186,13 @@ class OfTheDayManager:
|
|||||||
self._last_subtitle_debug_log = current_time
|
self._last_subtitle_debug_log = current_time
|
||||||
self.display_manager.draw_text(line, 1, 6,
|
self.display_manager.draw_text(line, 1, 6,
|
||||||
color=self.subtitle_color,
|
color=self.subtitle_color,
|
||||||
font=self.display_manager.extra_small_font)
|
font=self.display_manager.calendar_font)
|
||||||
|
|
||||||
# Draw description at the bottom - left justified
|
# Draw description at the bottom - left justified
|
||||||
if description:
|
if description:
|
||||||
# Use full width minus 2 pixels for maximum text
|
# Use full width minus 2 pixels for maximum text
|
||||||
available_width = self.display_manager.matrix.width - 2
|
available_width = self.display_manager.matrix.width - 2
|
||||||
wrapped_lines = self._wrap_text(description, available_width, self.display_manager.extra_small_font, max_lines=2)
|
wrapped_lines = self._wrap_text(description, available_width, self.display_manager.calendar_font, max_lines=2)
|
||||||
|
|
||||||
for i, line in enumerate(wrapped_lines):
|
for i, line in enumerate(wrapped_lines):
|
||||||
if line.strip():
|
if line.strip():
|
||||||
@@ -202,7 +202,7 @@ class OfTheDayManager:
|
|||||||
self._last_description_debug_log = current_time
|
self._last_description_debug_log = current_time
|
||||||
self.display_manager.draw_text(line, 1, 12 + (i * 6),
|
self.display_manager.draw_text(line, 1, 12 + (i * 6),
|
||||||
color=self.subtitle_color,
|
color=self.subtitle_color,
|
||||||
font=self.display_manager.extra_small_font)
|
font=self.display_manager.calendar_font)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user