I have a code that I use wrap text, but I would like to add text-align: justify in order to fill whole image. How do I do this?
from PIL import Image, ImageDraw, ImageFont
import textwrap
astr = 'Python '
para = textwrap.wrap(astr*100, width=15)
MAX_W, MAX_H = 200, 200
im = Image.new('RGB', (MAX_W, MAX_H), (0, 0, 0, 0))
draw = ImageDraw.Draw(im)
font = ImageFont.truetype('arial.ttf', 18)
current_h, pad = 0, 0
for line in para:
w, h = draw.textsize(line, font=font)
draw.text(((MAX_W - 1.7*w) / 2, current_h), line, font=font)
current_h += h + pad
im
Output:

