Skip to content

Commit 37bda92

Browse files
committed
fix text bbox
1 parent e8a7353 commit 37bda92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/lcd/lcd_comm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def DisplayText(
213213
# Crop text bitmap to keep only the text (also crop if text overflows display)
214214
left, top, text_width, text_height = d.textbbox((0, 0), text, font=font)
215215
text_image = text_image.crop(box=(
216-
x, y,
216+
x + left, y + top,
217217
min(x + text_width, self.get_width()),
218218
min(y + text_height, self.get_height())
219219
))

0 commit comments

Comments
 (0)