Spaces:
Running
Running
update font
Browse files
app.py
CHANGED
@@ -96,12 +96,12 @@ class Demo:
|
|
96 |
|
97 |
draw = ImageDraw.Draw(image)
|
98 |
# Set settings for the fonts
|
99 |
-
font_title = ImageFont.truetype(
|
100 |
title_width, title_height = draw.textsize(title, font=font_title)
|
101 |
title_x = (canvas_size - title_width) // 2
|
102 |
title_y = (canvas_size - title_height) // 2 - 100
|
103 |
|
104 |
-
font_undertitle = ImageFont.truetype(
|
105 |
text_width, text_height = draw.textsize(undertitle, font=font_undertitle)
|
106 |
undertitle_x = (canvas_size - text_width) // 2
|
107 |
undertitle_y = (canvas_size - text_height) // 2 - 50
|
|
|
96 |
|
97 |
draw = ImageDraw.Draw(image)
|
98 |
# Set settings for the fonts
|
99 |
+
font_title = ImageFont.truetype("Ubuntu-R.ttf", 32)
|
100 |
title_width, title_height = draw.textsize(title, font=font_title)
|
101 |
title_x = (canvas_size - title_width) // 2
|
102 |
title_y = (canvas_size - title_height) // 2 - 100
|
103 |
|
104 |
+
font_undertitle = ImageFont.truetype("Ubuntu-R.ttf", 15)
|
105 |
text_width, text_height = draw.textsize(undertitle, font=font_undertitle)
|
106 |
undertitle_x = (canvas_size - text_width) // 2
|
107 |
undertitle_y = (canvas_size - text_height) // 2 - 50
|