corvo7 commited on
Commit
89dfb06
·
verified ·
1 Parent(s): 62ba29d

Update pages/RoadMap.py

Browse files
Files changed (1) hide show
  1. pages/RoadMap.py +1 -1
pages/RoadMap.py CHANGED
@@ -53,7 +53,7 @@ def create_roadmap_image(topics):
53
  [box_x, box_y, box_x + box_width, box_y + box_height],
54
  outline="black", width=2
55
  )
56
- text_width, text_height = draw.textsize(topic, font=font)
57
  text_x = box_x + (box_width - text_width) // 2
58
  text_y = box_y + (box_height - text_height) // 2
59
  draw.text((text_x, text_y), topic, fill="black", font=font)
 
53
  [box_x, box_y, box_x + box_width, box_y + box_height],
54
  outline="black", width=2
55
  )
56
+ text_width, text_height = draw.textbbox((0, 0), topic, font=font)[2:]
57
  text_x = box_x + (box_width - text_width) // 2
58
  text_y = box_y + (box_height - text_height) // 2
59
  draw.text((text_x, text_y), topic, fill="black", font=font)