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 14 methods for working with EotFont objects in Python programs.
Available methods include: __init__, convert, encoding, font_family, font_name, font_style, font_type, get_kern_pairs, glyph_accessor, metrics, num_glyphs, save, and 2 additional methods.
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. |
font_type() → FontType | Returns the FontType enumeration value of this EOT font |
font_name() → str | Property contains the font’s name string |
font_family() → str | Property contains the font family name string |
font_style() → str | Returns the style descriptor (e.g., Regular, Bold) as a string |
num_glyphs() → int | Property stores the total glyph count of the font |
metrics() → FontMetrics | Property holds a FontMetrics object with metric data for the font |
encoding() → FontEncoding | Property holds a FontEncoding object describing the font’s encoding |
glyph_accessor() → GlyphAccessor | Calls glyph_accessor on this EotFont instance. |
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 |