Working with EOT Fonts
Working with EOT Fonts
This guide shows how to load Embedded OpenType (EOT) files and convert them to modern formats such as TTF or WOFF2 for current browsers and operating systems.
Embedded OpenType (EOT) is a legacy web font format used primarily by older Internet Explorer versions. Aspose.Font FOSS for Python can load and convert EOT fonts to modern formats for web or desktop use.
Loading an EOT Font
FontLoader.open() auto-detects EOT format from the binary header and returns a font object with standard metadata properties such as font_name and num_glyphs.
from aspose_font.loader import FontLoader
font = FontLoader.open("LegacyFont.eot")
print(font.font_name, font.num_glyphs)Converting EOT to TTF
FontConverter.convert(font, target) accepts any loaded font and produces a new font object in the specified target format. The conversion preserves glyph outlines and metadata.
from aspose_font.loader import FontLoader
from aspose_font.converter import FontConverter
eot = FontLoader.open("LegacyFont.eot")
ttf = FontConverter.convert(eot, target_format="ttf")Tips and Best Practices
- EOT files can be loaded and converted to other formats; use
EotSerializer.serialize(font)to produce EOT binary output - For modern web delivery, convert EOT to WOFF2 via
FontConverter.convert(font, "woff2") - Use
EotSerializer.serialize()for direct EOT serialization
API Reference Summary
| Class / Method | Description |
|---|---|
FontLoader.open(path) | Load an EOT font from a file path |
FontConverter.convert(font, target_format) | Convert EOT to another format |
EotSerializer | Direct EOT serialization |