TrueTypeOutlines
TrueTypeOutlines
概述
TrueTypeOutlines 是 Aspose.PDF FOSS 中用于 Python 的类。
从嵌入的 TrueType(glyf)程序中解码字形轮廓。
此类提供 3 个方法,用于在 Python 程序中处理 TrueTypeOutlines 对象。可用的方法包括:__init__、advance_width、outline。在安装 Aspose.PDF FOSS for Python 包后,所有公共成员对任何 Python 应用程序均可访问。属性:num_glyphs、ok、units_per_em。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
ok | bool | 读取 | True 当一个 TrueType glyf 程序成功解析时。 |
units_per_em | `` | 读取 | 获取每个 em 的单位。 |
num_glyphs | `` | 读取 | 获取字形数量。 |
方法
| 签名 | 描述 |
|---|---|
__init__(font_bytes: bytes) | Calls init(font_bytes) 在此 TrueTypeOutlines 实例上。 |
outline(gid: int) → list[Contour] | 返回已展平的闭合轮廓 gid 以字体单位(y 向上)。 |
advance_width(gid: int) → `int | None` |