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.7 KiB
Python
Raw Normal View History

2024-07-25 15:55:49 +03:00
from typing import Any, Callable
2024-05-07 15:30:34 +03:00
2024-07-25 15:55:49 +03:00
from . import ImageFont, _imaging
2024-05-07 15:30:34 +03:00
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,
2024-06-15 09:05:58 +03:00
string: str | bytes,
2024-07-25 15:55:49 +03:00
fill: Callable[[int, int], _imaging.ImagingCore],
mode: str,
dir: str | None,
features: list[str] | None,
lang: str | None,
stroke_width: float,
anchor: str | None,
foreground_ink_long: int,
x_start: float,
y_start: float,
/,
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,
2024-07-25 15:55:49 +03:00
mode: str,
dir: str | None,
features: list[str] | None,
lang: str | None,
anchor: str | None,
2024-06-03 07:20:01 +03:00
/,
) -> tuple[tuple[int, int], tuple[int, int]]: ...
def getlength(
2024-07-25 15:55:49 +03:00
self,
string: str | bytes,
mode: str,
dir: str | None,
features: list[str] | None,
lang: str | None,
/,
2024-06-03 07:20:01 +03:00
) -> float: ...
def getvarnames(self) -> list[bytes]: ...
2024-07-25 15:55:49 +03:00
def getvaraxes(self) -> list[ImageFont.Axis]: ...
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,
2024-07-25 15:55:49 +03:00
index: int,
encoding: str,
font_bytes: bytes,
layout_engine: int,
) -> Font: ...
2023-12-27 02:40:55 +03:00
def __getattr__(name: str) -> Any: ...