change how font is loaded via systemctl - added direct paths

This commit is contained in:
Chuck
2025-08-13 20:36:23 -05:00
parent 8e1b04550b
commit 6bc1039ed6
16 changed files with 132 additions and 90 deletions

View File

@@ -38,7 +38,9 @@ class YouTubeDisplay:
def _initialize_display(self):
"""Initialize display components."""
self.font = ImageFont.truetype("assets/fonts/PressStart2P-Regular.ttf", 8)
script_dir = os.path.dirname(os.path.abspath(__file__))
ps2p = os.path.abspath(os.path.join(script_dir, "../assets/fonts/PressStart2P-Regular.ttf"))
self.font = ImageFont.truetype(ps2p, 8)
try:
self.youtube_logo = Image.open("assets/youtube_logo.png")
except Exception as e: