Move font location higher in script as it's user customizable.
@@ -41,6 +41,9 @@ from PIL import Image, ImageDraw, ImageFont
api_url = 'http://localhost/admin/api.php'
+# Load nice silkscreen font
+font = ImageFont.truetype('/home/pi/slkscr.ttf', 8)
+
# Create the I2C interface.
i2c = busio.I2C(SCL, SDA)
@@ -79,9 +82,6 @@ bottom = height - padding
# for drawing shapes.
x = 0
-# Load nice silkscreen font
-font = ImageFont.truetype('/home/pi/slkscr.ttf', 8)
-
while True:
# Draw a black filled box to clear the image.
draw.rectangle((0, 0, width, height), outline=0, fill=0)
