FontResolver
Overview
FontResolver is a class in Aspose.PDF FOSS for Python.
Index external font sources and resolve PDF font names against them.
This class declares 4 methods for FontResolver objects in Python programs.
Available methods include: __init__, by_coverage, by_name, by_ordering.
All public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package.
Methods
| Signature | Description |
|---|---|
__init__(directories: tuple[Path, ...], programs: tuple[tuple[str, bytes], ...], use_system_fonts: bool, max_files: int, max_file_bytes: int) | Calls init(directories, programs, use_system_fonts, max_files, max_file_bytes) on this FontResolver instance. |
by_name(base_font: str | None, flags: int, italic_angle: float, font_weight: float | None) → ResolvedFace | None | Resolve a PDF /BaseFont name to an indexed face, or None. |
by_ordering(ordering: str | None, serif: bool, bold: bool, italic: bool, probe_scalars: tuple[int, ...]) → ResolvedFace | None | Resolve a face for a character collection (GB1, Japan1…). |
by_coverage(scalars: tuple[int, ...], bold: bool, italic: bool) → ResolvedFace | None | Resolve any indexed face whose cmap covers every scalar. |