change font size
This commit is contained in:
parent
ffeb80d66f
commit
9686365dfd
@ -20,7 +20,7 @@ epd = epd2in13b_V3.EPD()
|
|||||||
epd.init()
|
epd.init()
|
||||||
|
|
||||||
#Set fonts
|
#Set fonts
|
||||||
font10 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 10)
|
font12 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 12)
|
||||||
font14 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 14)
|
font14 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 14)
|
||||||
font16 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 16)
|
font16 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 16)
|
||||||
font18 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 18)
|
font18 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 18)
|
||||||
@ -64,11 +64,11 @@ def init_monitor():
|
|||||||
|
|
||||||
# Drawing on the Horizontal image
|
# Drawing on the Horizontal image
|
||||||
logging.info("1.Drawing on the Horizontal image...")
|
logging.info("1.Drawing on the Horizontal image...")
|
||||||
drawblack.text((4, 0), 'Lieber Reinhold, auf dich warten noch: ' + str(duration.days) + " Tage", font = font10, fill = 0)
|
drawblack.text((4, 0), 'Lieber Reinhold, auf dich warten noch: ' + str(duration.days) + " Tage", font = font12, fill = 0)
|
||||||
drawblack.text((4, 16), 'Oder ' + str(round(duration.days / 7,3)) + " Wochen", font = font16, fill = 0)
|
drawblack.text((4, 16), 'Oder ' + str(round(duration.days / 7,2)) + " Wochen", font = font16, fill = 0)
|
||||||
drawblack.text((4, 32), 'Oder ' + str(round(duration.days / 30,3)) + " Monate", font = font16, fill = 0)
|
drawblack.text((4, 32), 'Oder ' + str(round(duration.days / 30,2)) + " Monate", font = font16, fill = 0)
|
||||||
drawblack.text((4, 48), 'Oder ' + str(duration.days * 24) + " Stunden", font = font16, fill = 0)
|
drawblack.text((4, 48), 'Oder ' + str(duration.days * 24) + " Stunden", font = font16, fill = 0)
|
||||||
drawblack.text((4, 64), 'Oder ' + str(duration.days / 365) + " Jahre", font = font16, fill = 0)
|
drawblack.text((4, 64), 'Oder ' + str(round(duration.days / 365,2)) + " Jahre", font = font16, fill = 0)
|
||||||
drawblack.text((4, 80), "Bis du am " + str(ruhestand.strftime("%A %B %d.%m.%Y")), font = font14, fill = 0)
|
drawblack.text((4, 80), "Bis du am " + str(ruhestand.strftime("%A %B %d.%m.%Y")), font = font14, fill = 0)
|
||||||
|
|
||||||
epd.display(epd.getbuffer(HBlackimage), epd.getbuffer(HRYimage))
|
epd.display(epd.getbuffer(HBlackimage), epd.getbuffer(HRYimage))
|
||||||
|
Loading…
Reference in New Issue
Block a user