CompatibilityReport
概述
CompatibilityReport 是 Aspose.Font FOSS 中用于 Python 的一个类。
CompatibilityReport.to_json(indent, sort_keys) 返回报告的 JSON 字符串,write_json(target, indent, sort_keys) 则直接将该 JSON 写入文件。
此类提供 3 种方法,用于在 Python 程序中处理 CompatibilityReport 对象。可用的方法包括:to_dict、to_json、write_json。安装 Aspose.Font FOSS for Python 包后,所有公共成员对任何 Python 应用程序均可访问。属性:after_label、after_normalized_coordinates、before_label、before_normalized_coordinates、checked_codepoints、compared_glyphs,以及另外 3 项。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
is_compatible | bool | 读取 | 获取是否兼容。 |
before_label | str | 读取 | 获取之前的标签。 |
after_label | str | 读取 | 获取后标签。 |
checked_codepoints | tuple[int, ...] | 读取 | 获取已检查的代码点。 |
compared_glyphs | int | 读取 | 获取比较的字形。 |
before_normalized_coordinates | dict[str, float] | 读取 | 获取归一化前的坐标。 |
after_normalized_coordinates | dict[str, float] | 读取 | 获取归一化后的坐标。 |
issues | tuple[GlyphCompatibilityIssue, ...] | 读取 | 获取问题。 |
interpolation_issues | tuple[GlyphInterpolationIssue, ...] | 读取 | 获取插值问题。 |
方法
| 签名 | 描述 |
|---|---|
to_dict() → dict[str, object] | 返回兼容性报告的字典表示 |
to_json(indent: int, sort_keys: bool) → str | 返回报告的 JSON 字符串,并且 write_json(target, indent, sort_keys) 将该 JSON 直接写入文件 |
| `write_json(target: str | Path, indent: int, sort_keys: bool)` |