@@ -38,7 +38,6 @@ def __init__(self, problem_pdf_root: Path, primary_language: str):
3838
3939 self .statements_per_page = round (297 / statement_height )
4040 self .statement_height = 297 / self .statements_per_page
41- print (self .statement_height , self .statements_per_page )
4241
4342 register_font ("IBMPlexMono-Regular" )
4443 register_font ("IBMPlexMono-Bold" )
@@ -168,7 +167,7 @@ def _place_stamp(
168167
169168 bar_h = 8
170169 start_x = (offset_y + 5 ) * mm
171- start_y = (- 210 + self .stamp_width - 2 ) * mm
170+ start_y = (- 210 + self .stamp_width + 2 ) * mm
172171 max_width = (self .statement_height - 10 ) * mm
173172 max_height = (self .stamp_width - 2 - 5 ) * mm
174173
@@ -195,18 +194,6 @@ def _place_stamp(
195194 inverted = tearoff .team .venue .shortcode [- 1 ] == "S"
196195
197196 font_size = max_height - (bar_h + 0.5 ) * mm
198- # canvas.setFillGray(0)
199- # if inverted:
200- # canvas.rect(
201- # start_x,
202- # start_y,
203- # max_width - max_height - 2 * mm,
204- # -font_size,
205- # fill=True,
206- # stroke=False,
207- # )
208- # canvas.setFillGray(1)
209-
210197 spacing = 2 * mm if inverted else 1 * mm
211198
212199 text = canvas .beginText ()
@@ -253,16 +240,14 @@ def _place_stamp(
253240 start_y - max_height ,
254241 )
255242
256- canvas .restoreState ()
257-
258243 text = canvas .beginText ()
259- text .setTextOrigin (12 * mm , (offset_y + 5 ) * mm )
260- text .setFont ("LinLibertine-Bold" , 10 )
261- text .textOut (f"{ tearoff .team .code } : " )
262- text .setFont ("LinLibertine-Regular" , 10 )
244+ text .setTextOrigin (start_x , start_y - max_height - 8 )
245+ text .setFont ("IBMPlexMono-Regular" , 6 )
263246 text .textOut (tearoff .team .display_name_short )
264247 canvas .drawText (text )
265248
249+ canvas .restoreState ()
250+
266251 def add_statements_to_page (self , page : Page , tearoffs : Iterable [Tearoff | None ]):
267252 for i , tearoff in enumerate (tearoffs ):
268253 if tearoff is None :
0 commit comments