Skip to content

Commit 731d0b1

Browse files
committed
Default spacing of 4, update tests
1 parent d52e58d commit 731d0b1

5 files changed

+2
-2
lines changed

PIL/ImageDraw.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def text(self, xy, text, fill=None, font=None, anchor=None):
267267
self.draw.draw_bitmap(xy, mask, ink)
268268

269269
def multiline_text(self, xy, text, fill=None, font=None, anchor=None,
270-
spacing=0, align="left"):
270+
spacing=4, align="left"):
271271
widths = []
272272
max_width = 0
273273
lines = self._multiline_split(text)

Tests/images/multiline_text.png

58 Bytes
Loading
61 Bytes
Loading

Tests/images/multiline_text_right.png

58 Bytes
Loading

Tests/test_imagefont.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def test_render_multiline(self):
130130
im = Image.new(mode='RGB', size=(300, 100))
131131
draw = ImageDraw.Draw(im)
132132
ttf = ImageFont.truetype(FONT_PATH, FONT_SIZE)
133-
line_spacing = draw.textsize('A', font=ttf)[1]
133+
line_spacing = draw.textsize('A', font=ttf)[1] + 4
134134
lines = TEST_TEXT.split("\n")
135135
y = 0
136136
for line in lines:

0 commit comments

Comments
 (0)