FontDescriptor
Overview
FontDescriptor is a class in Aspose.PDF FOSS for Python.
Represents a discoverable font.
This class provides 3 methods for working with FontDescriptor objects in Python programs.
Available methods include: __init__, get_font_bytes, matches.
All public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package.
Properties: face_index, family_name, font_type, full_name, has_font_data, is_embedded, and 5 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
has_font_data | bool | Read | Return True if a font program can be produced for embedding. |
name | `` | Read | Gets the name. |
font_type | `` | Read | Gets the font type. |
is_embedded | `` | Read | Gets the is embedded. |
is_standard | `` | Read | Gets the is standard. |
path | `` | Read | Gets the path. |
face_index | `` | Read | Gets the face index. |
family_name | `` | Read | Gets the family name. |
subfamily_name | `` | Read | Gets the subfamily name. |
full_name | `` | Read | Gets the full name. |
postscript_name | `` | Read | Gets the postscript name. |
Methods
| Signature | Description |
|---|---|
__init__(name: str, font_type: str, is_embedded: bool, is_standard: bool, path: str | None, face_index: int, family_name: str | None, subfamily_name: str | None, full_name: str | None, postscript_name: str | None, data: bytes | None) | Calls init(name, font_type, is_embedded, is_standard, path, face_index, family_name, subfamily_name, full_name, postscript_name, data) on this FontDescriptor instance. |
get_font_bytes(limits: PdfLoadLimits | None) → bytes | Return the embeddable font program bytes for this descriptor. |
matches(query: str) → bool | Return True if query matches any known name (case-insensitive). |