if item.get('vskip'):
cursor += item['vskip']
text = item['text'].format(**context)
+ if not text:
+ continue
if item.get('uppercase'):
text = text.upper()
font = ImageFont.truetype(get_font_path(item['font-family']), item['font-size'])
realheight = draw.textsize(line, font=font)[1]
if cursor + realheight > newimg.size[1]:
return False
+ draw.text((0, cursor), line, font=font, fill=item.get('color'))
cursor += item['line-height']
img.paste(newimg, (d.get('x', 0), d.get('y', 0)), newimg)