CoolFace
Apppublic

Aluode/PerceptionLabPortable

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
_imagingft.pyi71 linesDownload Raw Back to PIL
1from collections.abc import Callable
2from typing import Any
3
4from . import ImageFont, _imaging
5
6class Font:
7    @property
8    def family(self) -> str | None: ...
9    @property
10    def style(self) -> str | None: ...
11    @property
12    def ascent(self) -> int: ...
13    @property
14    def descent(self) -> int: ...
15    @property
16    def height(self) -> int: ...
17    @property
18    def x_ppem(self) -> int: ...
19    @property
20    def y_ppem(self) -> int: ...
21    @property
22    def glyphs(self) -> int: ...
23    def render(
24        self,
25        string: str | bytes,
26        fill: Callable[[int, int], _imaging.ImagingCore],
27        mode: str,
28        dir: str | None,
29        features: list[str] | None,
30        lang: str | None,
31        stroke_width: float,
32        stroke_filled: bool,
33        anchor: str | None,
34        foreground_ink_long: int,
35        start: tuple[float, float],
36        /,
37    ) -> tuple[_imaging.ImagingCore, tuple[int, int]]: ...
38    def getsize(
39        self,
40        string: str | bytes | bytearray,
41        mode: str,
42        dir: str | None,
43        features: list[str] | None,
44        lang: str | None,
45        anchor: str | None,
46        /,
47    ) -> tuple[tuple[int, int], tuple[int, int]]: ...
48    def getlength(
49        self,
50        string: str | bytes,
51        mode: str,
52        dir: str | None,
53        features: list[str] | None,
54        lang: str | None,
55        /,
56    ) -> float: ...
57    def getvarnames(self) -> list[bytes]: ...
58    def getvaraxes(self) -> list[ImageFont.Axis]: ...
59    def setvarname(self, instance_index: int, /) -> None: ...
60    def setvaraxes(self, axes: list[float], /) -> None: ...
61
62def getfont(
63    filename: str | bytes,
64    size: float,
65    index: int,
66    encoding: str,
67    font_bytes: bytes,
68    layout_engine: int,
69) -> Font: ...
70def __getattr__(name: str) -> Any: ...
71 
Aluode/PerceptionLabPortable · CoolFace