fix text out of bounds
Browse files
app.py
CHANGED
@@ -146,7 +146,7 @@ def generate_image(bac_img, title,a,b,c,d,e,f, #-- ε½εζζ¬θ‘ε
εζ°ε―
|
|
146 |
continue
|
147 |
sub_title = lines[0]
|
148 |
sub_texts = "γ".join(lines[1:])
|
149 |
-
words = int((width - txt_x) / sz3)
|
150 |
sub_text = textwrap.wrap(sub_texts, width=words)
|
151 |
# sub_text = [i.center(words) for i in sub_text]
|
152 |
# -----ζζ¬ζ‘ζζ--------
|
|
|
146 |
continue
|
147 |
sub_title = lines[0]
|
148 |
sub_texts = "γ".join(lines[1:])
|
149 |
+
words = int((width - txt_x) / sz3) - 2
|
150 |
sub_text = textwrap.wrap(sub_texts, width=words)
|
151 |
# sub_text = [i.center(words) for i in sub_text]
|
152 |
# -----ζζ¬ζ‘ζζ--------
|