TopDict
Overview
TopDict is a class in Aspose.Font FOSS for Python.
TopDict.from_dict(d, string_index) creates a TopDict instance from a dictionary representation and a string‑index table, allowing programmatic reconstruction of font top‑level metadata.
This class provides 2 methods for working with TopDict objects in Python programs.
Available methods include: from_dict, get_sid.
All public members are accessible to any Python application after installing the Aspose.Font FOSS for Python package.
Properties: charset_offset, charstring_type, charstrings_offset, encoding_offset, family_name, font_bbox, and 10 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
full_name | str | Read/Write | Gets or sets the full name. |
family_name | str | Read/Write | Gets or sets the family name. |
weight | str | Read/Write | Gets or sets the weight. |
version | str | Read/Write | Gets or sets the version. |
font_bbox | tuple[int, int, int, int] | Read/Write | Gets or sets the font bbox. |
charstring_type | int | Read/Write | Gets or sets the charstring type. |
italic_angle | float | Read/Write | Gets or sets the italic angle. |
is_fixed_pitch | bool | Read/Write | Gets or sets the is fixed pitch. |
underline_position | int | Read/Write | Gets or sets the underline position. |
underline_thickness | int | Read/Write | Gets or sets the underline thickness. |
font_matrix | tuple[float, float, float, float, float, float] | Read/Write | Gets or sets the font matrix. |
charset_offset | int | Read/Write | Gets or sets the charset offset. |
encoding_offset | int | Read/Write | Gets or sets the encoding offset. |
charstrings_offset | int | Read/Write | Gets or sets the charstrings offset. |
private_size | int | Read/Write | Gets or sets the private size. |
private_offset | int | Read/Write | Gets or sets the private offset. |
Methods
| Signature | Description |
|---|---|
from_dict(d: CffDict, string_index: CffIndex) → "TopDict" | Creates a TopDict instance from a dictionary representation and a string‑index table, allowing programmatic reconstruction of font top‑level metadata |
get_sid(op: int) → str | Returns the string name associated with a given operator code |