Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -60,11 +60,12 @@ def generate_profile():
|
|
60 |
# Define text positions
|
61 |
y_start = pfp_y + pfp_size + 30 # Start below the profile picture
|
62 |
spacing = 80 # Vertical gap between lines
|
63 |
-
text_color = (
|
64 |
|
65 |
# Centered text positions
|
66 |
def draw_centered_text(text, y, font):
|
67 |
-
|
|
|
68 |
x = (W - text_width) // 2 # Center the text
|
69 |
draw.text((x, y), text, font=font, fill=text_color)
|
70 |
|
|
|
60 |
# Define text positions
|
61 |
y_start = pfp_y + pfp_size + 30 # Start below the profile picture
|
62 |
spacing = 80 # Vertical gap between lines
|
63 |
+
text_color = (173, 216, 230) # Light blue
|
64 |
|
65 |
# Centered text positions
|
66 |
def draw_centered_text(text, y, font):
|
67 |
+
bbox = draw.textbbox((0, 0), text, font=font) # Get bounding box
|
68 |
+
text_width = bbox[2] - bbox[0] # Calculate text width
|
69 |
x = (W - text_width) // 2 # Center the text
|
70 |
draw.text((x, y), text, font=font, fill=text_color)
|
71 |
|