Fix kneeboard bug preventing mission generation

This commit is contained in:
Raffson 2023-10-08 14:21:11 +02:00
parent b8ef4fc726
commit c9ed0352b7
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99

View File

@ -116,7 +116,8 @@ class KneeboardPageWriter:
) )
self.draw.text(self.position, text, font=font, fill=fill) self.draw.text(self.position, text, font=font, fill=fill)
width, height = self.draw.textsize(text, font=font) # type:ignore[attr-defined] box = self.draw.textbbox(self.position, text, font=font)
height = abs(box[1] - box[3]) # abs(top - bottom) => offset
self.y += height + self.line_spacing self.y += height + self.line_spacing
self.text_buffer.append(text) self.text_buffer.append(text)