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

NameTypeAccessDescription
full_namestrRead/WriteGets or sets the full name.
family_namestrRead/WriteGets or sets the family name.
weightstrRead/WriteGets or sets the weight.
versionstrRead/WriteGets or sets the version.
font_bboxtuple[int, int, int, int]Read/WriteGets or sets the font bbox.
charstring_typeintRead/WriteGets or sets the charstring type.
italic_anglefloatRead/WriteGets or sets the italic angle.
is_fixed_pitchboolRead/WriteGets or sets the is fixed pitch.
underline_positionintRead/WriteGets or sets the underline position.
underline_thicknessintRead/WriteGets or sets the underline thickness.
font_matrixtuple[float, float, float, float, float, float]Read/WriteGets or sets the font matrix.
charset_offsetintRead/WriteGets or sets the charset offset.
encoding_offsetintRead/WriteGets or sets the encoding offset.
charstrings_offsetintRead/WriteGets or sets the charstrings offset.
private_sizeintRead/WriteGets or sets the private size.
private_offsetintRead/WriteGets or sets the private offset.

Methods

SignatureDescription
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)strReturns the string name associated with a given operator code

See Also