Merge pull request #8261 from radarhere/imagefont

This commit is contained in:
Hugo van Kemenade 2024-09-04 14:49:23 +03:00 committed by GitHub
commit 1dffc09c28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -212,7 +212,7 @@ class FreeTypeFont:
def __init__(
self,
font: StrOrBytesPath | BinaryIO | None = None,
font: StrOrBytesPath | BinaryIO,
size: float = 10,
index: int = 0,
encoding: str = "",
@ -781,7 +781,7 @@ def load(filename: str) -> ImageFont:
def truetype(
font: StrOrBytesPath | BinaryIO | None = None,
font: StrOrBytesPath | BinaryIO,
size: float = 10,
index: int = 0,
encoding: str = "",
@ -852,7 +852,7 @@ def truetype(
:exception ValueError: If the font size is not greater than zero.
"""
def freetype(font: StrOrBytesPath | BinaryIO | None) -> FreeTypeFont:
def freetype(font: StrOrBytesPath | BinaryIO) -> FreeTypeFont:
return FreeTypeFont(font, size, index, encoding, layout_engine)
try: