(draw: ImageDraw.ImageDraw, text: str, font: ImageFont.FreeTypeFont)
| 69 | |
| 70 | |
| 71 | def text_size(draw: ImageDraw.ImageDraw, text: str, font: ImageFont.FreeTypeFont) -> tuple[int, int]: |
| 72 | box = draw.textbbox((0, 0), text, font=font) |
| 73 | return box[2] - box[0], box[3] - box[1] |
| 74 | |
| 75 | |
| 76 | def centered_text( |
no outgoing calls
no test coverage detected