Open GearKite opened 3 years ago
Thanks for the issue! This logic is currently in src/utils.py around line 40. in this block of code:
for line in utils.split_string(text, 10):
text_dimensions = utils.get_text_dimensions(line, font)
x = (image_width - text_dimensions[0]) / 2
draw.text((x, y),line,font=font,fill=(255,255,255))
y += 50 # adding 50 pixel buffer to next line
This is an edge case that haddent come up on the demo's I tested this for. I am open to different suggestions on how to alter the code to fix that problem such as multiple images (like a continued page or something). Since it seems like more people are interested in this code after posting it to reddit I am open to hearing the communities ideas for a fix before implementing a change in the code. Feel free to give a suggestion.
The logic is now in ImageCreator.py
still unchanged.
Longer comments go outside the image like this