Spaces:
Sleeping
Sleeping
Update src/pyscripts/img_process.py
Browse files
src/pyscripts/img_process.py
CHANGED
|
@@ -544,12 +544,12 @@ def write_person_line(background, person, H_PADDING_RATION, start_y, photo_size_
|
|
| 544 |
round_photo = write_round_photo(background, person, H_PADDING_RATION * bg_width + radius, start_y + radius, radius)
|
| 545 |
pioneer_part_width += round_photo.size[1]
|
| 546 |
|
| 547 |
-
|
| 548 |
|
| 549 |
name_padding = 50 * scale
|
| 550 |
title_padding = 20 * scale
|
| 551 |
|
| 552 |
-
people_text_y = start_y + (2 * radius - font_size - name_padding - title_font_size * scale * len(
|
| 553 |
conference_rundown_people_name, background, next_height = write_text(
|
| 554 |
text,
|
| 555 |
font_path,
|
|
@@ -564,7 +564,7 @@ def write_person_line(background, person, H_PADDING_RATION, start_y, photo_size_
|
|
| 564 |
font_size = title_font_size * scale
|
| 565 |
font_path = font_path_notosansM
|
| 566 |
# pioneer_part_width = H_PADDING_RATION * bg_width + round_photo.size[1] + font_size
|
| 567 |
-
for i, text in enumerate(
|
| 568 |
conference_rundown_people_title, background, next_height = write_text(
|
| 569 |
text,
|
| 570 |
font_path,
|
|
|
|
| 544 |
round_photo = write_round_photo(background, person, H_PADDING_RATION * bg_width + radius, start_y + radius, radius)
|
| 545 |
pioneer_part_width += round_photo.size[1]
|
| 546 |
|
| 547 |
+
titles = person["title"].split("\n")
|
| 548 |
|
| 549 |
name_padding = 50 * scale
|
| 550 |
title_padding = 20 * scale
|
| 551 |
|
| 552 |
+
people_text_y = start_y + (2 * radius - font_size - name_padding - title_font_size * scale * len(titles)) // 2
|
| 553 |
conference_rundown_people_name, background, next_height = write_text(
|
| 554 |
text,
|
| 555 |
font_path,
|
|
|
|
| 564 |
font_size = title_font_size * scale
|
| 565 |
font_path = font_path_notosansM
|
| 566 |
# pioneer_part_width = H_PADDING_RATION * bg_width + round_photo.size[1] + font_size
|
| 567 |
+
for i, text in enumerate(titles):
|
| 568 |
conference_rundown_people_title, background, next_height = write_text(
|
| 569 |
text,
|
| 570 |
font_path,
|