1
1
from PIL import Image , ImageFont , ImageDraw , ImageSequence
2
- from utils import center_text , convert_date_format
2
+ from utils import center_text , convert_date_format , strip_accents
3
3
from renderer .matrix import MatrixPixels
4
4
import debug
5
5
6
+
6
7
"""
7
8
Show the details of a goal:
8
9
- Time of the goal and which period
@@ -72,13 +73,13 @@ def draw_scorer(self):
72
73
73
74
self .matrix .draw_text (
74
75
(8 , 20 ),
75
- self .scorer ["info" ]["firstName" ]["default" ].upper (),
76
+ strip_accents ( self .scorer ["info" ]["firstName" ]["default" ].upper () ),
76
77
font = self .font ,
77
78
fill = (255 ,255 ,255 )
78
79
)
79
80
self .matrix .draw_text (
80
81
(8 , 26 ),
81
- self .scorer ["info" ]["lastName" ]["default" ].upper (),
82
+ strip_accents ( self .scorer ["info" ]["lastName" ]["default" ].upper () ),
82
83
font = self .font ,
83
84
fill = (255 ,255 ,255 )
84
85
)
@@ -94,7 +95,7 @@ def draw_details(self):
94
95
95
96
scorer_name_coord = self .matrix .draw_text (
96
97
(1 , 8 ),
97
- self .scorer ["info" ]["lastName" ]["default" ].upper (),
98
+ strip_accents ( self .scorer ["info" ]["lastName" ]["default" ].upper () ),
98
99
font = self .font ,
99
100
fill = (255 , 255 , 255 )
100
101
)
@@ -118,7 +119,7 @@ def draw_details(self):
118
119
for i in range (len (self .assists )):
119
120
assist_name_coord = self .matrix .draw_text (
120
121
(1 , assists_y_pos ),
121
- self .assists [i ]["info" ]["lastName" ]["default" ].upper (),
122
+ strip_accents ( self .assists [i ]["info" ]["lastName" ]["default" ].upper () ),
122
123
font = self .font ,
123
124
fill = (255 , 255 , 255 )
124
125
)
@@ -173,4 +174,4 @@ def draw_hashtag(self):
173
174
self .layout .scorer_info .hashtag_dots ,
174
175
pixels ,
175
176
(10 , 10 )
176
- )
177
+ )
0 commit comments