diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py index 0b0806b3f39..f72adff467c 100644 --- a/addons/web_editor/controllers/main.py +++ b/addons/web_editor/controllers/main.py @@ -115,7 +115,9 @@ class Web_Editor(http.Controller): image = Image.new("RGBA", (width, height), color) draw = ImageDraw.Draw(image) - boxw, boxh = draw.textsize(icon, font=font_obj) + box = draw.textbbox((0, 0), icon, font=font_obj) + boxw = box[2] - box[0] + boxh = box[3] - box[1] draw.text((0, 0), icon, font=font_obj) left, top, right, bottom = image.getbbox()