Overview
TtfFont is a class in Aspose.Font FOSS for Python.
Inherits from: Font.
Properties
| Name | Type | Access | Description |
|---|
font_type | FontType | Read | |
font_name | str | Read | |
font_family | str | Read | |
font_style | str | Read | |
num_glyphs | int | Read | |
metrics | FontMetrics | Read | |
encoding | FontEncoding | Read | |
glyph_accessor | GlyphAccessor | Read | |
ttf_tables | TtfTableSet | Read | |
cff_font | `` | Read | |
fvar | "FvarTable | None" | Read | Lazily parse and return the FVAR table, or None if not a variable font. |
hvar | "HvarTable | None" | Read | |
is_variable | bool | Read | |
axes | "list[AxisRecord]" | Read | |
named_instances | "list[NamedInstance]" | Read | |
variable_axes | list[VariableAxis] | Read | |
variable_instances | list[VariableInstance] | Read | |
smart_instancer | `` | Read | |
_cff_font | `` | Read | |
Methods
| Signature | Description |
|---|
__init__(sfnt_data: bytes, tables: TtfTableSet, sfnt_version: int) | |
get_blob(tag: str) → bytes | None | |
get_table_bytes(tag: str) → bytes | |
set_table_bytes(tag: str, data: bytes) | |
get_axis(tag: str) → VariableAxis | None | |
get_named_instance(name: str, preferred_languages: str | tuple[str, ...]) → VariableInstance | None | |
variable_presentation(preferred_languages: str | tuple[str, ...], include_suggested_values: bool) → dict[str, object] | |
available_naming_strategies() → tuple[str, ...] | |
instantiate(coordinates: dict[str, float], naming_strategy: str, family_suffix: str | None, legacy_family_name: str | None, typographic_family_name: str | None, legacy_style_name: str | None, typographic_style_name: str | None) → "TtfFont" | |
get_kern_pairs() → list[KernPair] | |
to_bytes(font_type: FontType | None) → bytes | |