glaze is a Python library and command line tool for rendering
algorithmically-generated fonts and typefaces.
>>> import matplotlib.pyplot as plt
>>> from glaze import read_json, render
>>>
>>> font = read_json("data/Georgia.json")
>>> font_name, glyph_name, glyph = font[0]
>>> render(glyph)
>>> plt.show()The latest release of glaze can be installed from PyPI:
pip install glazeTo use glaze as a library:
import matplotlib.pyplot as plt
from glaze import render
fig = render(contours) # Render one glyphTo run glaze on the command line:
# Recommended usage
glaze --directory PATH/TO/DATA/
# Alternative usage
glaze --files FILES-
The
--directorymust have the following structure:data ├── json │ ├── Georgia.json │ └── ... └── ...
where the
.jsonfiles are those produced byknead. Renders will be saved in a directorydata/renders-TTTT-DD-MM/, whereTTTTis military time. -
However, should you want to render only a few files, you can use the
--filesflag, which must be one of:- a path to a
.jsonfile (again, such as those produced byknead), - a comma-separated list of such paths, or
- a regex matching the path(s) to one or more
.jsonfiles.
- a path to a
Renders will be saved in the present working directory (unless the --output
flag is
passed).
Refer to our quickstart for
more information on how to use glaze.
Please refer to our full documentation.
Contributions are always welcome! Please see our issue tracker for outstanding issues, code of conduct for community guidelines, and our contributing guide for details on how to make a contribution.
glaze is licensed under the MIT
license.