Load, examine and save fonts in Context format
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file contextfonteditor-1.0.3.tar.gz.
File metadata
- Download URL: contextfonteditor-1.0.3.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24b3ea109f4394a994e38046254be862b7de9995174812259e0ea9c180a27f56
|
|
| MD5 |
42c4ea3f3ad27f5e9155dab1e39b2303
|
|
| BLAKE2b-256 |
d92ba188c4063bb7011f1e93a7cdf2752de74657667b3cbc0f8640e2665dc595
|
Provenance
The following attestation bundles were made for contextfonteditor-1.0.3.tar.gz:
Publisher:
ci.yml on yanone/context-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
contextfonteditor-1.0.3.tar.gz -
Subject digest:
24b3ea109f4394a994e38046254be862b7de9995174812259e0ea9c180a27f56 - Sigstore transparency entry: 660485146
- Sigstore integration time:
-
Permalink:
yanone/context-py@4f1c00a1932c0c2daf0b53b1e6d657d47eb35324 -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/yanone
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@4f1c00a1932c0c2daf0b53b1e6d657d47eb35324 -
Trigger Event:
push
-
Statement type:
File details
Details for the file contextfonteditor-1.0.3-py3-none-any.whl.
File metadata
- Download URL: contextfonteditor-1.0.3-py3-none-any.whl
- Upload date:
- Size: 521.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
baf30bd47cdcd471cd1f128b23ca492cb4450583b8e2a13a69c9c816772ffe52
|
|
| MD5 |
7eda0eabcb3900dfaf49f14ab55da3d6
|
|
| BLAKE2b-256 |
412d8be0bef87c87e4801ecb13f0c0e28b204c150d152cce89253e23850683bf
|
Provenance
The following attestation bundles were made for contextfonteditor-1.0.3-py3-none-any.whl:
Publisher:
ci.yml on yanone/context-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
contextfonteditor-1.0.3-py3-none-any.whl -
Subject digest:
baf30bd47cdcd471cd1f128b23ca492cb4450583b8e2a13a69c9c816772ffe52 - Sigstore transparency entry: 660485151
- Sigstore integration time:
-
Permalink:
yanone/context-py@4f1c00a1932c0c2daf0b53b1e6d657d47eb35324 -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/yanone
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@4f1c00a1932c0c2daf0b53b1e6d657d47eb35324 -
Trigger Event:
push
-
Statement type: