change text size
This commit is contained in:
parent
4c073df6a8
commit
e9960c0ef4
@ -26,7 +26,7 @@ try:
|
|||||||
|
|
||||||
# Drawing on the image
|
# Drawing on the image
|
||||||
logging.info("Drawing")
|
logging.info("Drawing")
|
||||||
font20 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 20)
|
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)
|
||||||
|
|
||||||
# Drawing on the Horizontal image
|
# Drawing on the Horizontal image
|
||||||
@ -35,11 +35,11 @@ try:
|
|||||||
HRYimage = Image.new('1', (epd.height, epd.width), 255) # 298*126 ryimage: red or yellow image
|
HRYimage = Image.new('1', (epd.height, epd.width), 255) # 298*126 ryimage: red or yellow image
|
||||||
drawblack = ImageDraw.Draw(HBlackimage)
|
drawblack = ImageDraw.Draw(HBlackimage)
|
||||||
drawry = ImageDraw.Draw(HRYimage)
|
drawry = ImageDraw.Draw(HRYimage)
|
||||||
drawblack.text((2, 0), 'PV Production', font = font18, fill = 0)
|
drawblack.text((2, 0), 'PV Production', font = font16, fill = 0)
|
||||||
drawblack.text((2, 20), 'Hausverbrauch', font = font18, fill = 0)
|
drawblack.text((2, 20), 'Hausverbrauch', font = font16, fill = 0)
|
||||||
drawblack.text((2, 40), 'Strom Import', font = font18, fill = 0)
|
drawblack.text((2, 40), 'Strom Import', font = font16, fill = 0)
|
||||||
drawblack.text((2, 60), 'Batterie', font = font18, fill = 0)
|
drawblack.text((2, 60), 'Batterie', font = font16, fill = 0)
|
||||||
drawblack.text((2, 80), 'Batterie Entladen', font = font18, fill = 0)
|
drawblack.text((2, 80), 'Batterie Entladen', font = font16, 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