ChenyuRabbitLove commited on
Commit
c0fd726
โ€ข
1 Parent(s): 5102bf8

chore: modify reward image text width

Browse files
Files changed (1) hide show
  1. utils/completion_reward.py +2 -2
utils/completion_reward.py CHANGED
@@ -493,7 +493,7 @@ class ImageProcessor:
493
 
494
  # Draw the text
495
  title_font = ImageFont.truetype("NotoSansTC-Bold.ttf", 36)
496
- body_font = ImageFont.truetype("NotoSansTC-Light.ttf", 12)
497
 
498
  # Title text
499
  title = f"ๅ…‰ๆŸๅฎˆ่ญท่€… - {player_name} ็š„ๅ†’้šชๆ•…ไบ‹"
@@ -504,7 +504,7 @@ class ImageProcessor:
504
  body_x, body_y = left + 20, title_y + 60 # Adjust position as needed
505
 
506
  for line in paragraph.split("\n"):
507
- wrapped_lines = textwrap.wrap(line, width=55)
508
  for wrapped_line in wrapped_lines:
509
  draw.text((body_x, body_y), wrapped_line, font=body_font, fill="black")
510
  body_y += 30
 
493
 
494
  # Draw the text
495
  title_font = ImageFont.truetype("NotoSansTC-Bold.ttf", 36)
496
+ body_font = ImageFont.truetype("NotoSansTC-Light.ttf", 14)
497
 
498
  # Title text
499
  title = f"ๅ…‰ๆŸๅฎˆ่ญท่€… - {player_name} ็š„ๅ†’้šชๆ•…ไบ‹"
 
504
  body_x, body_y = left + 20, title_y + 60 # Adjust position as needed
505
 
506
  for line in paragraph.split("\n"):
507
+ wrapped_lines = textwrap.wrap(line, width=70)
508
  for wrapped_line in wrapped_lines:
509
  draw.text((body_x, body_y), wrapped_line, font=body_font, fill="black")
510
  body_y += 30