mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 02:06:18 +03:00
Default spacing of 4, update tests
This commit is contained in:
parent
d52e58dbbd
commit
731d0b1b73
|
@ -267,7 +267,7 @@ class ImageDraw(object):
|
||||||
self.draw.draw_bitmap(xy, mask, ink)
|
self.draw.draw_bitmap(xy, mask, ink)
|
||||||
|
|
||||||
def multiline_text(self, xy, text, fill=None, font=None, anchor=None,
|
def multiline_text(self, xy, text, fill=None, font=None, anchor=None,
|
||||||
spacing=0, align="left"):
|
spacing=4, align="left"):
|
||||||
widths = []
|
widths = []
|
||||||
max_width = 0
|
max_width = 0
|
||||||
lines = self._multiline_split(text)
|
lines = self._multiline_split(text)
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.8 KiB |
|
@ -130,7 +130,7 @@ try:
|
||||||
im = Image.new(mode='RGB', size=(300, 100))
|
im = Image.new(mode='RGB', size=(300, 100))
|
||||||
draw = ImageDraw.Draw(im)
|
draw = ImageDraw.Draw(im)
|
||||||
ttf = ImageFont.truetype(FONT_PATH, FONT_SIZE)
|
ttf = ImageFont.truetype(FONT_PATH, FONT_SIZE)
|
||||||
line_spacing = draw.textsize('A', font=ttf)[1]
|
line_spacing = draw.textsize('A', font=ttf)[1] + 4
|
||||||
lines = TEST_TEXT.split("\n")
|
lines = TEST_TEXT.split("\n")
|
||||||
y = 0
|
y = 0
|
||||||
for line in lines:
|
for line in lines:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user