mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 02:06:18 +03:00
Merge pull request #8261 from radarhere/imagefont
This commit is contained in:
commit
1dffc09c28
|
@ -212,7 +212,7 @@ class FreeTypeFont:
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
font: StrOrBytesPath | BinaryIO | None = None,
|
font: StrOrBytesPath | BinaryIO,
|
||||||
size: float = 10,
|
size: float = 10,
|
||||||
index: int = 0,
|
index: int = 0,
|
||||||
encoding: str = "",
|
encoding: str = "",
|
||||||
|
@ -781,7 +781,7 @@ def load(filename: str) -> ImageFont:
|
||||||
|
|
||||||
|
|
||||||
def truetype(
|
def truetype(
|
||||||
font: StrOrBytesPath | BinaryIO | None = None,
|
font: StrOrBytesPath | BinaryIO,
|
||||||
size: float = 10,
|
size: float = 10,
|
||||||
index: int = 0,
|
index: int = 0,
|
||||||
encoding: str = "",
|
encoding: str = "",
|
||||||
|
@ -852,7 +852,7 @@ def truetype(
|
||||||
:exception ValueError: If the font size is not greater than zero.
|
: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)
|
return FreeTypeFont(font, size, index, encoding, layout_engine)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user