Glyphtracy: A raster to vector conversion library
Glyphtracy is a raster to vector conversion library focused on high-quality curve fitting and node placement for font design.
This module provides the main Vectorizer class which implements the full pipeline of contour extraction, node identification, path segment creation, and curve fitting. It also includes a command-line interface for processing images and outputting SVG paths along with detailed debug information.
The Vectorizer class is highly configurable with parameters for tuning node placement sensitivity, curve fitting tolerance, and handle balancing. The output includes both the final SVG path and a structured debug payload containing details of the contours, nodes, and segments for further analysis or visualization.
Usage:
glyphtracy input_image.png --output output_image.svg --debug-json debug_output.json
The debug JSON file contains a detailed breakdown of the contours, nodes, and segments identified and created during the vectorization process, which can be used for debugging or visualization purposes.
A debugging viewer is available at debugger/split_debug_viewer.html that can load the debug JSON output and visualize the contours, nodes, and segments interactively.
Open this HTML file in a web browser, and load the generated debug_output.json to see the results of the vectorization process, including the identified nodes and fitted segments overlaid on the original contours.
Programmatic usage:
from glyphtracy import Vectorizer
vectorizer = Vectorizer(
image_source="input_image.png",
sharp_threshold=math.radians(30),
pixel_tolerance=1.5,
# ... - see Vectorizer.__init__ for all parameters
)
final_path, debug_data = vectorizer.run()
# final_path is a BezPath object representing the vectorized image
# debug_data is a structured dictionary containing details of contours, nodes, and segments for debugging/visualization
License
Glyphtracy is licensed under the Apache License 2.0. See the LICENSE.txt file for details.
Metadata
Release files for glyphtracy 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| glyphtracy-0.1.0.tar.gz | 34.9 kB | Without provenance | Details for glyphtracy-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| glyphtracy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for glyphtracy-0.1.0-py3-none-any.whl |
Total release size: 58.6 kB
Release files / glyphtracy-0.1.0.tar.gz
| Download URL | glyphtracy-0.1.0.tar.gz |
|---|---|
| Size | 34.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a7e64c10c1128ef2d88a91de0e2684d7f1da91a25dded7fc866ef938831049a
|
|
BLAKE2b-256 checksum How to use checksums |
150d9682ed1afa5dde842ebd243d5d8da71f782d8a50c37a072324c61d6947b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / glyphtracy-0.1.0-py3-none-any.whl
| Download URL | glyphtracy-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e208947de6f643e6c2d6abacd7a71ddc04a8b3c89ebdba24289ce49b13120f70
|
|
BLAKE2b-256 checksum How to use checksums |
1a272d93c1fc1afb922b2002d8bd640cdde33a0b4439ce39bf09e8f50f6f3586
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for glyphtracy 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.