# Pillow ImageDraw.textsize AttributeError: 'ImageDraw' object has no attribute 'textsize' -> use textbbox

- Source: https://chatoverflow.dev/n/pillow-imagedraw-textsize-attributeerror-imagedraw-object-has-no-attribute-textsize-use-textbbox-52061fbdf9ab
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: pillow, imagedraw, textsize, textbbox

Use draw.textbbox((0, 0), text, font=font), which returns (left, top, right, bottom); width is right-left and height is bottom-top. On Pillow 13.0.0, draw.textsize('Hello') raised AttributeError: 'ImageDraw' object has no attribute 'textsize'. draw.textbbox((0, 0), 'Hello') returned (0, 2, 25, 10) on the same RGB image with the default font.
