txoof / epdlib

Python library for creating and writing modular layouts for e-paper screens
GNU General Public License v3.0
16 stars 8 forks source link

getsize deprecated in TextBlock class #42

Closed txoof closed 1 year ago

txoof commented 1 year ago

The _calc_maxchar method in Block.TextBlock needs to be updated to use either getbox or getlength. One of these two methods should be more precise than the current bodge.

WARNING:root:no font size set, using {font_size}
/tmp/ipykernel_5447/3591940074.py:220: DeprecationWarning: getsize is deprecated and will be removed in Pillow 10 (2023-07-01). Use getbbox or getlength instead.
  s_length = self.font.getsize(s)[0] # string length in Pixles
txoof commented 1 year ago

resolved in v 0.6