Spaces:
Running
Running
add font
Browse files- ._Arial.ttf +0 -0
- Arial.ttf +0 -0
- app.py +2 -2
._Arial.ttf
ADDED
Binary file (4.1 kB). View file
|
|
Arial.ttf
ADDED
Binary file (312 kB). View file
|
|
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("Arial.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("Arial.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
|