We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1a8d84 commit 7ba1ae7Copy full SHA for 7ba1ae7
1 file changed
examples/ssd1306_pillow_demo.py
@@ -61,7 +61,8 @@
61
62
# Draw Some Text
63
text = "Hello World!"
64
-(font_width, font_height) = font.getsize(text)
+bbox = font.getbbox(text)
65
+(font_width, font_height) = bbox[2] - bbox[0], bbox[3] - bbox[1]
66
draw.text(
67
(oled.width // 2 - font_width // 2, oled.height // 2 - font_height // 2),
68
text,
0 commit comments