Pillow/src/PIL/_imagingft.pyi

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
1.6 KiB
Python
Raw Normal View History

2024-05-07 15:30:34 +03:00
from typing import Any, TypedDict
2024-06-03 07:20:01 +03:00
from . import _imaging
2024-05-07 15:30:34 +03:00
class _Axis(TypedDict):
minimum: int | None
default: int | None
maximum: int | None
name: str | None
class Font:
@property
def family(self) -> str | None: ...
@property
def style(self) -> str | None: ...
@property
def ascent(self) -> int: ...
@property
def descent(self) -> int: ...
@property
def height(self) -> int: ...
@property
def x_ppem(self) -> int: ...
@property
def y_ppem(self) -> int: ...
@property
def glyphs(self) -> int: ...
def render(
self,
string: str,
fill,
mode=...,
dir=...,
features=...,
lang=...,
stroke_width=...,
anchor=...,
foreground_ink_long=...,
x_start=...,
y_start=...,
/,
2024-06-03 07:20:01 +03:00
) -> tuple[_imaging.ImagingCore, tuple[int, int]]: ...
def getsize(
2024-06-03 07:20:01 +03:00
self,
string: str | bytes | bytearray,
mode=...,
dir=...,
features=...,
lang=...,
anchor=...,
/,
) -> tuple[tuple[int, int], tuple[int, int]]: ...
def getlength(
self, string: str, mode=..., dir=..., features=..., lang=..., /
2024-06-03 07:20:01 +03:00
) -> float: ...
def getvarnames(self) -> list[bytes]: ...
def getvaraxes(self) -> list[_Axis] | None: ...
2024-05-07 15:30:34 +03:00
def setvarname(self, instance_index: int, /) -> None: ...
def setvaraxes(self, axes: list[float], /) -> None: ...
def getfont(
2024-06-03 07:20:01 +03:00
filename: str | bytes,
size: float,
index=...,
encoding=...,
font_bytes=...,
layout_engine=...,
) -> Font: ...
2023-12-27 02:40:55 +03:00
def __getattr__(name: str) -> Any: ...