Add param
This commit is contained in:
@@ -19,7 +19,7 @@ def auto_wrap_text(text, max_width):
|
|||||||
line = ""
|
line = ""
|
||||||
for word in words:
|
for word in words:
|
||||||
test_line = f"{line} {word}".strip()
|
test_line = f"{line} {word}".strip()
|
||||||
test_clip = TextClip(test_line, font=font, font_size=font_size, color='white', method='label')
|
test_clip = TextClip(text=test_line, font=font, font_size=font_size, color='white', method='label')
|
||||||
|
|
||||||
if test_clip.w > max_width and line != "":
|
if test_clip.w > max_width and line != "":
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
|
|||||||
Reference in New Issue
Block a user