zdxpan commited on
Commit
7532c75
β€’
1 Parent(s): 04edf71

fix text out of bounds

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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) + 2
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
  # -----ζ–‡ζœ¬ζ‘†ζ•ˆζžœ--------