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: ...
|
2024-05-07 15:33:59 +03:00
|
|
|
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]]: ...
|
2024-05-07 15:33:59 +03:00
|
|
|
def getsize(
|
2024-06-03 07:20:01 +03:00
|
|
|
self,
|
|
|
|
string: str | bytes | bytearray,
|
|
|
|
mode=...,
|
|
|
|
dir=...,
|
|
|
|
features=...,
|
|
|
|
lang=...,
|
|
|
|
anchor=...,
|
|
|
|
/,
|
2024-05-07 15:33:59 +03:00
|
|
|
) -> 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: ...
|
|
|
|
|
2024-05-07 15:33:59 +03:00
|
|
|
def getfont(
|
2024-06-03 07:20:01 +03:00
|
|
|
filename: str | bytes,
|
|
|
|
size: float,
|
2024-05-07 15:33:59 +03:00
|
|
|
index=...,
|
|
|
|
encoding=...,
|
|
|
|
font_bytes=...,
|
|
|
|
layout_engine=...,
|
|
|
|
) -> Font: ...
|
2023-12-27 02:40:55 +03:00
|
|
|
def __getattr__(name: str) -> Any: ...
|