Type1Outlines
Overview
Type1Outlines is a class in Aspose.PDF FOSS for Python.
Decode glyph outlines from a Type 1 (/FontFile) font program.
This class provides 3 methods for working with Type1Outlines objects in Python programs.
Available methods include: __init__, advance_width, outline.
All public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package.
Properties: builtin_encoding, glyph_names, name_to_gid, num_glyphs, ok, units_per_em.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
ok | bool | Read | True when a Type 1 program with charstrings was parsed. |
units_per_em | `` | Read | Gets the units per em. |
num_glyphs | `` | Read | Gets the num glyphs. |
glyph_names | list[str] | Read | Gets the glyph names. |
name_to_gid | dict[str, int] | Read | Gets the name to gid. |
builtin_encoding | dict[int, str] | Read | Gets the builtin encoding. |
Methods
| Signature | Description |
|---|---|
__init__(font_bytes: bytes, length1: int | None, length2: int | None) | Calls init(font_bytes, length1, length2) on this Type1Outlines instance. |
outline(gid: int) → list[Contour] | Return flattened, closed contours for gid in font units (y up). |
advance_width(gid: int) → int | None | Type 1 advance widths are not surfaced (PDF /Widths is used). |