Before this commit:
We used the .textsize method, which returned the height and width of the
icon. However, in the latest version of Pillow, this method was deprecated,
resulting in errors in the log.
After this commit:
We have transitioned to using the textbbox method, which returns the
coordinates of the top, left, bottom, and right of the text's bounding box.
From these coordinates, we calculate the height and width of the text.
task-3502373
closesodoo/odoo#140613
Signed-off-by: Antoine Guenet (age) <age@odoo.com>