We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The file examples/qrcode_text/png_text.py Fails with missing method:
fw, fh = font.getsize(line) ^^^^^^^^^^^^ AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
This patch fixes it.
--- a/png_text.py 2023-10-17 12:33:47.469268721 -0400 +++ b/png_text.py 2023-10-17 12:34:17.220677606 -0400 @@ -89,7 +89,9 @@ lines = text.splitlines() # Calculate the additional space required for the text for line in lines: - fw, fh = font.getsize(line) + (left, top, right, bottom) = font.getbbox(line) + fw = right - left + fh = bottom - top if fw > width: width = fw + font_size height += fh + line_spacing
The text was updated successfully, but these errors were encountered:
184c7ec
No branches or pull requests
The file examples/qrcode_text/png_text.py
Fails with missing method:
This patch fixes it.
The text was updated successfully, but these errors were encountered: