EotFont
Overview
EotFont is a class in Aspose.Font FOSS for Python.
Inherits from: Font.
Embedded OpenType (EOT) wrapper over an inner TrueType/OpenType font.
This class provides 6 methods for working with EotFont objects in Python programs.
Available methods include: __init__, convert, get_kern_pairs, save, save_to_format, to_bytes.
All public members are accessible to any Python application after installing the Aspose.Font FOSS for Python package.
Properties: charset, encoding, eot_version, flags, font_family, font_name, and 9 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
font_type | FontType | Read | Gets the font type. |
inner_font | TtfFont | Read | Gets the inner font. |
font_name | str | Read | Gets the font name. |
font_family | str | Read | Gets the font family. |
font_style | str | Read | Gets the font style. |
num_glyphs | int | Read | Gets the num glyphs. |
metrics | FontMetrics | Read | Gets the metrics. |
encoding | FontEncoding | Read | Gets the encoding. |
glyph_accessor | GlyphAccessor | Read | Gets the glyph accessor. |
eot_version | int | Read | Gets the eot version. |
flags | int | Read | Gets the flags. |
charset | int | Read | Gets the charset. |
italic | int | Read | Gets the italic. |
weight | int | Read | Gets the weight. |
fs_type | int | Read | Gets the fs type. |
Methods
| Signature | Description |
|---|---|
__init__(inner: TtfFont, eot_version: int, flags: int, charset: int, italic: int, weight: int, fs_type: int) | Create an EOT wrapper around an inner sfnt font. |
get_kern_pairs() → list[KernPair] | Returns the kern pairs. |
to_bytes(font_type: FontType | None) → bytes | Serialize this font as EOT bytes or delegate cross-format conversion. |
save(path: str) | Writes the EOT font to the file system at the specified path |
save_to_format(font_type: FontType, path: str) | Converts the font to the given FontType and saves it to the path |
convert(target: FontType) → Font | Creates and returns a new Font object of the specified target FontType |