ai_v/venv/Lib/site-packages/PIL/_imagingft.pyi
24024 d4b28a731a feat(admin): 添加系统通知管理及前端通知显示功能
- 新增 SystemNotification 模型,实现系统通知的数据存储
- 管理后台新增通知相关接口,支持通知的增删改查
- 用户端新增接口,获取最新激活通知并支持标记已读
- 在前端首页添加全局通知弹窗,实现通知自动轮询及已读同步
- 生成历史记录中兼容支持图片缩略图及新旧图片格式
- 优化后台图片同步逻辑,新增缩略图生成与存储
- 支持上传参考图的拖拽、粘贴、多文件上传及排序功能
- 增加购买积分页面入口及菜单项,调整菜单结构
- 日志系统由 Redis 列表迁移为有序集合,保留 30 天日志
- 优化日志页面样式,提升可读性及滚动体验
- 调整部分模板布局为自定义滚动条容器,增强视觉一致性
2026-01-12 23:29:29 +08:00

71 lines
1.8 KiB
Python

from collections.abc import Callable
from typing import Any
from . import ImageFont, _imaging
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 | bytes,
fill: Callable[[int, int], _imaging.ImagingCore],
mode: str,
dir: str | None,
features: list[str] | None,
lang: str | None,
stroke_width: float,
stroke_filled: bool,
anchor: str | None,
foreground_ink_long: int,
start: tuple[float, float],
/,
) -> tuple[_imaging.ImagingCore, tuple[int, int]]: ...
def getsize(
self,
string: str | bytes | bytearray,
mode: str,
dir: str | None,
features: list[str] | None,
lang: str | None,
anchor: str | None,
/,
) -> tuple[tuple[int, int], tuple[int, int]]: ...
def getlength(
self,
string: str | bytes,
mode: str,
dir: str | None,
features: list[str] | None,
lang: str | None,
/,
) -> float: ...
def getvarnames(self) -> list[bytes]: ...
def getvaraxes(self) -> list[ImageFont.Axis]: ...
def setvarname(self, instance_index: int, /) -> None: ...
def setvaraxes(self, axes: list[float], /) -> None: ...
def getfont(
filename: str | bytes,
size: float,
index: int,
encoding: str,
font_bytes: bytes,
layout_engine: int,
) -> Font: ...
def __getattr__(name: str) -> Any: ...