mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Require font parameter for truetype()
This commit is contained in:
parent
d0d4227515
commit
68328ccc6a
|
@ -756,7 +756,7 @@ def load(filename: str) -> ImageFont:
|
|||
|
||||
|
||||
def truetype(
|
||||
font: StrOrBytesPath | BinaryIO | None = None,
|
||||
font: StrOrBytesPath | BinaryIO,
|
||||
size: float = 10,
|
||||
index: int = 0,
|
||||
encoding: str = "",
|
||||
|
@ -827,7 +827,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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user