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)