TopDict
TopDict
概述
TopDict 是Python的Aspose.Font FOSS中的一个类.
创建一个TopDict实例,由字典表示和串索引表创作,允许编程重构顶级字体元数据.
这个类提供了在Python程序中使用TopDict 对象的2种方法. 有的方法包括: from_dict, get_sid. 在安装Python包的Aspose.Font FOSS后,所有公众成员都可以访问任何 Python 应用程序. 特性: charset_offset, charstring_type, charstrings_offset, encoding_offset, family_name, font_bbox,另外10个.
属性
| 名称: | 类型 | Access | 描述情况 |
|---|---|---|---|
full_name | str | 阅读/写作 | 获取或设置完整名称。. |
family_name | str | 阅读/写作 | 获取或设置姓氏。. |
weight | str | 阅读/写作 | 获取或设置权重。. |
version | str | 阅读/写作 | 获取或设置版本。. |
font_bbox | tuple[int, int, int, int] | 阅读/写作 | 获取或设置字体的边界框。. |
charstring_type | int | 阅读/写作 | 获取或设置 charstring 类型。. |
italic_angle | float | 阅读/写作 | 获取或设置斜体角度。. |
is_fixed_pitch | bool | 阅读/写作 | 获取或设置是否固定音高。. |
underline_position | int | 阅读/写作 | 获取或设置下划线位置。. |
underline_thickness | int | 阅读/写作 | 获取或设置下划线的厚度。. |
font_matrix | tuple[float, float, float, float, float, float] | 阅读/写作 | 获取或设置字体矩阵。. |
charset_offset | int | 阅读/写作 | 获取或设置字符集偏移。. |
encoding_offset | int | 阅读/写作 | 获取或设置编码偏移量。. |
charstrings_offset | int | 阅读/写作 | 获取或设置 charstrings 偏移量。. |
private_size | int | 阅读/写作 | 获取或设置私有大小。. |
private_offset | int | 阅读/写作 | 获取或设置私有偏移量。. |
方法
| Signature | 描述情况 |
|---|---|
from_dict(d: CffDict, string_index: CffIndex) → "TopDict" | 从字典表格和串索引表中创建一个 TopDict 实例,允许程序性重构顶级字体元数据. |
get_sid(op: int) → str | 返回与给定运算符代码相关的字符串名称. |