Installation
Installation
Aspose.Font FOSS for Python is a pure-Python package. It has no C extensions, no system font library dependencies, and no platform-specific requirements. Install it with the command below in any Python 3.10+ environment.
Prerequisites
| Requirement | Detail |
|---|---|
| Python | 3.10 or later |
| Package manager | pip (included with Python 3.10+) |
| Operating system | Windows, macOS, or Linux |
| External dependencies | None — pure Python, no OS font libraries required |
Step 1 — Install the Package
Run the following command in your terminal, or activate your virtual environment first:
git clone https://github.com/aspose-font-foss/Aspose.Font-FOSS-for-Python.git
cd Aspose.Font-FOSS-for-Python
pip install -e .Step 2 — Verify the Installation
After installation, confirm the package loaded correctly by running a quick import check.
If you see a ModuleNotFoundError, ensure you installed into the correct Python
environment. Using a virtual environment avoids version conflicts with other projects:
import aspose_font
print("aspose_font loaded successfully")Step 3 — Load Your First Font
Once installed, you can load any TTF, OTF, CFF, WOFF, WOFF2, EOT, or Type 1 font
file using FontLoader.open(). The call returns a Font instance that exposes
metadata, glyph data, and conversion utilities:
from aspose_font import FontLoader
font = FontLoader.open("path/to/your-font.ttf")
print(font.font_family, font.num_glyphs, "glyphs")