Skip to main content

Context: Load, examine and save fonts in Context format

This describes Context >3.0, which is a complete rewrite from the previous version.

Context is a utility for loading and examining fonts in the Context format.

The Context format is a JSON-based font format that provides a simple and consistent way to work with font data. It supports single master and variable fonts.

The object hierarchy can be seen here.

For example:

from context import load

font = load("Myfont.context")
default_a = font.default_master.get_glyph_layer("A")
top_anchor = default_a.anchors_dict["top"]
print("Top anchor = (%i,%i)" % (top_anchor.x, top_anchor.y))
print("LSB, RSB = (%i,%i)" % (default_a.lsb, default_a.rsb))
font.save("Myfont-modified.context")

AI-Friendly Documentation

Context includes an AI documentation generator for creating concise, natural language documentation suitable for LLM/AI prompts:

from context import generate_minimal_docs, generate_class_docs, generate_all_docs

# Generate minimal documentation for common use cases
minimal_docs = generate_minimal_docs()

# Generate documentation for a specific class
from context import Font
font_docs = generate_class_docs(Font)

# Generate full documentation for all classes
all_docs = generate_all_docs()

This is useful when you need to provide context about Context's structure to an AI assistant.

Release files for contextfonteditor 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for contextfonteditor 1.0.3
File Size Uploaded
contextfonteditor-1.0.3.tar.gz 1.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for contextfonteditor 1.0.3
File Interpreter ABI Platform
contextfonteditor-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 1.9 MB

Release files / contextfonteditor-1.0.3.tar.gz

Download URL contextfonteditor-1.0.3.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
24b3ea109f4394a994e38046254be862b7de9995174812259e0ea9c180a27f56
BLAKE2b-256 checksum
How to use checksums
d92ba188c4063bb7011f1e93a7cdf2752de74657667b3cbc0f8640e2665dc595
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2025.

Transparency log

Release files / contextfonteditor-1.0.3-py3-none-any.whl

Download URL contextfonteditor-1.0.3-py3-none-any.whl
Size 521.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
baf30bd47cdcd471cd1f128b23ca492cb4450583b8e2a13a69c9c816772ffe52
BLAKE2b-256 checksum
How to use checksums
412d8be0bef87c87e4801ecb13f0c0e28b204c150d152cce89253e23850683bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page