Skip to content

Commit

Permalink
Update src/PIL/ImageFont.py
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Murray <[email protected]>
  • Loading branch information
akx and radarhere authored Nov 28, 2023
1 parent 4ea5289 commit 8ff6522
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PIL/ImageFont.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,11 +788,11 @@ def truetype(font=None, size=10, index=0, encoding="", layout_engine=None):
.. versionadded:: 4.2.0
:return: A font object.
:exception OSError: If the file could not be read.
:exception ValueError: If the size given is invalid.
:exception ValueError: If the font size is not greater than zero.
"""

if size <= 0:
msg = "font size must be positive"
msg = "font size must be greater than 0"
raise ValueError(msg)

def freetype(font):
Expand Down

0 comments on commit 8ff6522

Please sign in to comment.