fix get_width

This commit is contained in:
j 2023-08-31 18:58:26 +01:00
parent d5635508bb
commit dd130004ee

View file

@ -174,7 +174,7 @@ def wrapText(text, max_width, max_lines, font_file, font_size):
return min_width return min_width
def get_width(string): def get_width(string):
return textsize(draw, text, font)[0] return textsize(draw, string, font)[0]
image = Image.new('RGB', (1, 1)) image = Image.new('RGB', (1, 1))
draw = ImageDraw.Draw(image) draw = ImageDraw.Draw(image)