use getbbox instead of getsize in fuzzers.py

This commit is contained in:
nulano 2022-06-20 02:49:26 +01:00
parent 93acbcf9e2
commit a7baa31de8
No known key found for this signature in database
GPG Key ID: B650CDF63B705766

View File

@ -33,9 +33,9 @@ def fuzz_font(data):
# different font objects.
return
font.getsize_multiline("ABC\nAaaa")
font.getbbox("ABC")
font.getmask("test text")
with Image.new(mode="RGBA", size=(200, 200)) as im:
draw = ImageDraw.Draw(im)
draw.multiline_textsize("ABC\nAaaa", font, stroke_width=2)
draw.multiline_textbbox((10, 10), "ABC\nAaaa", font, stroke_width=2)
draw.text((10, 10), "Test Text", font=font, fill="#000")