From f727a3ff4de024f8664f0dce7462fb923d0cede4 Mon Sep 17 00:00:00 2001 From: Robert Borzutzki Date: Wed, 19 Oct 2022 09:28:23 +0200 Subject: [PATCH] text 12 --- examples/mqtt.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/mqtt.py b/examples/mqtt.py index 699f221..5f30aa3 100644 --- a/examples/mqtt.py +++ b/examples/mqtt.py @@ -30,7 +30,7 @@ try: # Drawing on the image logging.info("Drawing") - font10 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 10) + font10 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 12) # Drawing on the Horizontal image logging.info("1.Drawing on the Horizontal image...") @@ -38,11 +38,11 @@ try: HRYimage = Image.new('1', (epd.height, epd.width), 255) # 298*126 ryimage: red or yellow image drawblack = ImageDraw.Draw(HBlackimage) drawry = ImageDraw.Draw(HRYimage) - drawblack.text((0, 0), 'PV Produktion', font = font10, fill = 0) - drawblack.text((0, 20), 'Hausverbrauch', font = font10, fill = 0) - drawblack.text((0, 40), 'Strom Import/Export', font = font10, fill = 0) - drawblack.text((0, 60), 'Batterie %', font = font10, fill = 0) - drawblack.text((0, 80), 'Batterie Laden/Entladen', font = font10, fill = 0) + drawblack.text((5, 0), 'PV Produktion', font = font10, fill = 0) + drawblack.text((5, 15), 'Hausverbrauch', font = font10, fill = 0) + drawblack.text((5, 30), 'Strom Import/Export', font = font10, fill = 0) + drawblack.text((5, 45), 'Batterie %', font = font10, fill = 0) + drawblack.text((5, 60), 'Batterie Laden/Entladen', font = font10, fill = 0) epd.display(epd.getbuffer(HBlackimage), epd.getbuffer(HRYimage)) time.sleep(2)