Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,7 +26,7 @@ def generate_qr_code(url, title):
|
|
| 26 |
|
| 27 |
# Draw the title on the image
|
| 28 |
draw = ImageDraw.Draw(result_image)
|
| 29 |
-
font_path = "
|
| 30 |
font = ImageFont.truetype(font_path, 24) # Use a specific font size
|
| 31 |
text_width, text_height = draw.textsize(title, font=font)
|
| 32 |
text_x = (image_width - text_width) / 2 # Center the text
|
|
|
|
| 26 |
|
| 27 |
# Draw the title on the image
|
| 28 |
draw = ImageDraw.Draw(result_image)
|
| 29 |
+
font_path = "dejavu-sans-bold.ttf" # Ensure the font path is correct
|
| 30 |
font = ImageFont.truetype(font_path, 24) # Use a specific font size
|
| 31 |
text_width, text_height = draw.textsize(title, font=font)
|
| 32 |
text_x = (image_width - text_width) / 2 # Center the text
|