Skip to content

Commit 1409def

Browse files
committed
feat(provenance): add FreeType renderer version
Record the linked FreeType library version beside the CrossGlyph and cpfont format versions. This identifies the rasterizer that produced the glyphs instead of relying on the freetype-py package version. Verified with the provenance tests, prose check, and the full CrossGlyph suite.
1 parent bffc468 commit 1409def

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

docs/fonts.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,7 @@ to somebody who liked how it looked, and what travels with it is four
10001000
"built": {
10011001
"at": "2026-08-15T08:44:43Z",
10021002
"by": "crossglyph X.Y.Z",
1003+
"freetype": "X.Y.Z",
10031004
"cpfont_format": 4,
10041005
"config": "bitter.conf",
10051006
"settings": {"gamma": 1.0, "hinting": "light", "figures": "proportional", },
@@ -1024,6 +1025,9 @@ Every setting, including the ones no config set. Defaults move between
10241025
versions, so a record of the departures alone would reproduce a different font
10251026
later, and neither copy could say which one shipped.
10261027

1028+
`freetype` is the version of FreeType that drew the glyphs, read from the
1029+
library itself rather than from the Python package that loads it.
1030+
10271031
Some of it serves a reader instead of a rebuild. `sha256` settles whether the
10281032
face you have is the face this was made from, where a version string is a claim
10291033
and a filename is a label. `licence_url` and `designer` answer the first two

src/crossglyph/provenance.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import pathlib
2424
import typing
2525

26+
import freetype
27+
2628
from . import cpfont, fontstamp, version
2729
from .fontconf import STYLES, Config, Variant, size_label, variable_font
2830

@@ -220,6 +222,7 @@ def describe(variant: Variant, directory: pathlib.Path,
220222
return {
221223
"at": stamped.replace(microsecond=0).isoformat().replace("+00:00", "Z"),
222224
"by": f"crossglyph {version.installed()}",
225+
"freetype": ".".join(map(str, freetype.version())),
223226
"cpfont_format": cpfont.CPFONT_VERSION,
224227
"config": config.path.name,
225228
"settings": _settings(variant),

tests/test_provenance.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77
import json
88

9+
import freetype
910
import pytest
1011

1112
from crossglyph import fontbuild, fontconf, fontstamp, provenance
@@ -79,6 +80,7 @@ def test_it_says_what_made_it(built):
7980

8081
made = built["built"]
8182
assert made["by"] == f"crossglyph {version.installed()}"
83+
assert made["freetype"] == ".".join(map(str, freetype.version()))
8284
assert made["cpfont_format"] == fontbuild.cpfont.CPFONT_VERSION
8385
assert made["config"] == "probe.conf"
8486
assert made["at"].endswith("Z")

0 commit comments

Comments
 (0)