Updated to work with Python 3 and Pillow

This commit is contained in:
jacob.eva 2023-07-03 09:07:15 +01:00
parent 9b2a375875
commit 0749a98dad
No known key found for this signature in database
GPG Key ID: 0B92E083BBCCAA1E

View File

@ -22,7 +22,7 @@ def create_antipixel(cfg):
even_parts = [] even_parts = []
for part in parts: for part in parts:
part['text_width'] = draw.textsize(part['text'], font=font)[0] part['text_width'] = draw.textlength(part['text'], font=font)
part_sizing = part.get('sizing', 'even') part_sizing = part.get('sizing', 'even')
if part_sizing == 'even': if part_sizing == 'even':
## Keep track as we'll need later.. ## Keep track as we'll need later..