diff --git a/LittlePaimon/utils/image.py b/LittlePaimon/utils/image.py index 937d781..ddf5403 100644 --- a/LittlePaimon/utils/image.py +++ b/LittlePaimon/utils/image.py @@ -217,7 +217,7 @@ class PMImage: height: Tuple[int, int], font: ImageFont.ImageFont, color: Union[str, Tuple[int, int, int, int]] = 'white'): - text_height = self.draw.textsize(text, font=font)[1] + text_height = self.draw.textbbox((0, 0), text = text, font=font)[3] - self.draw.textbbox((0, 0), text = text, font=font)[1] width_now = width[0] height_now = height[0] for c in text: