Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Subtitles can be wrapped, as well
  • Loading branch information
kthoden committed Apr 29, 2019
1 parent 962ed1f commit 0b90e16
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mkimage.py
Expand Up @@ -191,7 +191,10 @@ def create_cover(metadata_dict, image_directory, cover_filename, image_is_file):
text_draw.multiline_text((ttcenter, 200), title_text_joined, font=big_bold_font, align="center")

if len(subtitle_text) > 0:
text_draw.text((centered(subtitle_text, medium_font), 350), subtitle_text, font=medium_font, fill=fill_colour_top)
subtitle_lines = textwrap.wrap(subtitle_text, width=40)
subtitle_lines_joined = "\n".join(subtitle_lines)
subtitle_center = centered(subtitle_lines_joined, medium_font)
text_draw.multiline_text((subtitle_center, 350), subtitle_lines_joined, font=medium_font, fill=fill_colour_top, align="center")

authors_text_lines = textwrap.wrap(authors_text, width=50)
authors_text_joined = "\n".join(authors_text_lines)
Expand Down

0 comments on commit 0b90e16

Please sign in to comment.