Andereoo / TkinterWeb

Python bindings for Tkhtml.
MIT License
146 stars 16 forks source link

AttributeError: 'FreeTypeFont' object has no attribute 'getsize' #97

Closed hilmarski closed 4 months ago

hilmarski commented 4 months ago

The above mentioned exception is thrown when for a loaded html the alternative image is created. The reason is, that you make use of the function getsize, which is deprecated since version 9.2 of Pillow (s. https://pillow.readthedocs.io/en/stable/releasenotes/9.2.0.html#font-size-and-offset-methods). According to this, you should make use of the function getbbox. As a workaround I fall back to version 9.1 with Pillow, but it would be great if I could make use of the latest version.

Andereoo commented 4 months ago

Hi! I just fixed this issue; thanks for letting me know about this. Try updating both TkinterWeb and Pillow and let me know if it works!

hilmarski commented 4 months ago

Hi! Thanks a lot for this quick fix! I've updated both, and now I don't have this error anymore. Great! :+1: