update TransposedFont.getlength error message

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Ondrej Baranovič 2022-06-30 14:20:56 +02:00 committed by GitHub
parent 0d91d13a6e
commit f57a9d678c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -865,7 +865,7 @@ class TransposedFont:
def getlength(self, text, *args, **kwargs):
if self.orientation in (Image.Transpose.ROTATE_90, Image.Transpose.ROTATE_270):
raise ValueError("text length is undefined for rotated text")
raise ValueError("text length is undefined for text rotated by 90 or 270 degrees")
return self.font.getlength(text, *args, **kwargs)