FontDescriptor

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

NameTypeAccessDescription
has_font_databoolReadReturn True if a font program can be produced for embedding.
name``ReadGets the name.
font_type``ReadGets the font type.
is_embedded``ReadGets the is embedded.
is_standard``ReadGets the is standard.
path``ReadGets the path.
face_index``ReadGets the face index.
family_name``ReadGets the family name.
subfamily_name``ReadGets the subfamily name.
full_name``ReadGets the full name.
postscript_name``ReadGets the postscript name.

Methods

SignatureDescription
__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)bytesReturn the embeddable font program bytes for this descriptor.
matches(query: str)boolReturn True if query matches any known name (case-insensitive).

See Also