Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ def leaderboard(names):
|
|
| 24 |
if not os.path.exists(font_path):
|
| 25 |
return "Error: Font file 'Gagalin.otf' not found", 500
|
| 26 |
|
| 27 |
-
font = ImageFont.truetype(font_path,
|
| 28 |
|
| 29 |
# Image dimensions
|
| 30 |
img_width, img_height = bg.size
|
|
@@ -34,8 +34,8 @@ def leaderboard(names):
|
|
| 34 |
max_names = 10
|
| 35 |
|
| 36 |
if total_names == 3: # Special case: Center top 3
|
| 37 |
-
start_y =
|
| 38 |
-
line_spacing =
|
| 39 |
else:
|
| 40 |
start_y = 80
|
| 41 |
line_spacing = (img_height - 300) // max_names
|
|
|
|
| 24 |
if not os.path.exists(font_path):
|
| 25 |
return "Error: Font file 'Gagalin.otf' not found", 500
|
| 26 |
|
| 27 |
+
font = ImageFont.truetype(font_path, 36) # Adjust font size as needed
|
| 28 |
|
| 29 |
# Image dimensions
|
| 30 |
img_width, img_height = bg.size
|
|
|
|
| 34 |
max_names = 10
|
| 35 |
|
| 36 |
if total_names == 3: # Special case: Center top 3
|
| 37 |
+
start_y = 65
|
| 38 |
+
line_spacing = 158
|
| 39 |
else:
|
| 40 |
start_y = 80
|
| 41 |
line_spacing = (img_height - 300) // max_names
|