Why can't you change the font size?

In the variable fnt change the number, but the font size remains the same. What could be the problem and how to fix it?
from PIL import Image, ImageDraw, ImageFont
from openpyxl import load_workbook

wb = load_workbook(filename='Example.xlsx', read_only=True)
ws = wb.active
name = "
for row in ws.rows:
 counter = 0
 for cell in row:
print(cell.value)
 if counter == 0:
try:
 img_1 = Image.open(R ' images/{0}.png'.format(cell.value))
 name = str(cell.value)
 except FileNotFoundError:
continue
 counter += 1
 elif counter == 1:
 fnt = ImageFont.truetype(R Raleway\\Raleway-Medium.ttf', 70)
 ImageDraw.Draw(img_1).text((10, 30), "{0}".format(cell.value), fill='red')
 counter += 1
else:
 fnt = ImageFont.truetype(R Raleway\\Raleway-Medium.ttf', 70)
 ImageDraw.Draw(img_1).text((10, 60), "{0}".format(cell.value), fill='red')
 counter += 1
 img_1.save(r'{0}.png'.format(name), 'PNG')
March 19th 20 at 08:40
1 answer
March 19th 20 at 08:42
Solution
Before I wrote the question, I found a bug, setting the font did not finish.
ImageDraw.Draw(img_1).text((10, 30), "{0}".format(cell.value), fill='red', font=fnt)

Find more questions by tags Python