ChevalierJoseph commited on
Commit
4b10c37
·
verified ·
1 Parent(s): 3bb2f08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -551,11 +551,11 @@ def run_pipeline(enhanced, input_img, seed):
551
  def _render_preview(otf_path, font_name):
552
  try:
553
  from PIL import Image, ImageDraw, ImageFont
554
- sample = f"{font_name}\nAa Bb Cc 123\nThe quick brown fox"
555
  img = Image.new("RGB", (1700, 620), "white")
556
  draw = ImageDraw.Draw(img)
557
  font = ImageFont.truetype(otf_path, 150)
558
- draw.multiline_text((40, 30), sample, font=font, fill="black", spacing=30)
559
  return img
560
  except Exception as e:
561
  print(f"⚠️ Preview failed: {e}")
 
551
  def _render_preview(otf_path, font_name):
552
  try:
553
  from PIL import Image, ImageDraw, ImageFont
554
+ sample = f"{font_name}\nAa Bb Cc 123\nThe quick brown fox jumps over the lazy dog"
555
  img = Image.new("RGB", (1700, 620), "white")
556
  draw = ImageDraw.Draw(img)
557
  font = ImageFont.truetype(otf_path, 150)
558
+ draw.multiline_text((80, 70), sample, font=font, fill="black", spacing=70)
559
  return img
560
  except Exception as e:
561
  print(f"⚠️ Preview failed: {e}")