Skip to content

Commit caede14

Browse files
committed
Revert "Removed unused code"
This reverts commit 0e22b0c.
1 parent 208e9b5 commit caede14

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Tests/test_font_crash.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44

5-
from PIL import ImageFont
5+
from PIL import Image, ImageDraw, ImageFont
66

77
from .helper import skip_unless_feature
88

@@ -12,6 +12,10 @@ def _fuzz_font(self, font: ImageFont.FreeTypeFont) -> None:
1212
# from fuzzers.fuzz_font
1313
font.getbbox("ABC")
1414
font.getmask("test text")
15+
with Image.new(mode="RGBA", size=(200, 200)) as im:
16+
draw = ImageDraw.Draw(im)
17+
draw.multiline_textbbox((10, 10), "ABC\nAaaa", font, stroke_width=2)
18+
draw.text((10, 10), "Test Text", font=font, fill="#000")
1519

1620
@skip_unless_feature("freetype2")
1721
def test_segfault(self) -> None:

0 commit comments

Comments
 (0)