mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-06 14:13:15 +03:00
Added type hint
This commit is contained in:
parent
ae7958fa8d
commit
9e8edb42b6
|
@ -25,6 +25,8 @@
|
||||||
# See the README file for information on usage and redistribution.
|
# See the README file for information on usage and redistribution.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
@ -186,7 +188,14 @@ class ImageFont:
|
||||||
class FreeTypeFont:
|
class FreeTypeFont:
|
||||||
"""FreeType font wrapper (requires _imagingft service)"""
|
"""FreeType font wrapper (requires _imagingft service)"""
|
||||||
|
|
||||||
def __init__(self, font=None, size=10, index=0, encoding="", layout_engine=None):
|
def __init__(
|
||||||
|
self,
|
||||||
|
font: bytes | str | Path | None = None,
|
||||||
|
size: float = 10,
|
||||||
|
index: int = 0,
|
||||||
|
encoding: str = "",
|
||||||
|
layout_engine: int = None,
|
||||||
|
) -> None:
|
||||||
# FIXME: use service provider instead
|
# FIXME: use service provider instead
|
||||||
|
|
||||||
self.path = font
|
self.path = font
|
||||||
|
|
Loading…
Reference in New Issue
Block a user