Skip to content

feat(fallbacks): add Cooper Black -> Caprasimo (Regular-only, metric_safe)#45

Merged
caio-pizzol merged 1 commit into
mainfrom
caio-pizzol/cooper-black-row
Jun 6, 2026
Merged

feat(fallbacks): add Cooper Black -> Caprasimo (Regular-only, metric_safe)#45
caio-pizzol merged 1 commit into
mainfrom
caio-pizzol/cooper-black-row

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

Adds Cooper Black as a measured fallback. Caprasimo is a deliberate advance-clone of Cooper Black: across the Latin core every advance is identical (mean 0.00%, worst 0.00%), so the Regular face earns a direct metric_safe verdict with no glyph exceptions. It supplies only Regular, so bold/italic/boldItalic resolve to face_missing rather than being faux-styled onto a face the font lacks - the same shape as Baskerville Old Face -> Bacasime Antique, one tier cleaner.

This also restores a concise reviewed-record-to-package path so a row is added from evidence, not by hand-editing the generated module. The tradeoff considered: keep editing src/data.ts directly (fewer files) versus a source file plus generator. The generated module is large and easy to corrupt by hand, so a single editable records.json with a pure generator and a byte-level drift guard is the safer long-term shape - and it leaves the public package growing from measurement, not vendor lists.

  • records.json is the only file a reviewer edits; scripts/generate-data.ts renders src/data.ts (run bun run gen:data).
  • data-drift.test.ts re-renders in memory and byte-compares the checked-in module, so a hand-edit or a stale regenerate fails.
  • The row is asset-gated and face-aware: a consumer that does not bundle Caprasimo gets asset_missing, so it stays inert until the font is actually shipped.

Review: confirm the generator round-trips the prior 22 rows unchanged (diff is the header line + the new row only) and that the face-aware tests reject bold/italic misrouting. Ignore the biome-ignored src/data.ts formatting - it is generated.
Verified: bun run check -> typecheck ok, 30 tests across 4 files pass, biome clean, build ok; drift test -> fails on a stray edit, passes after regenerate.

…safe)

Caprasimo is a deliberate advance-clone of Cooper Black: across the Latin
core every measured advance is identical (mean 0.00%, worst 0.00%), so the
Regular face earns a direct metric_safe verdict with no glyph exceptions. It
supplies only Regular, so bold/italic/boldItalic resolve to face_missing
rather than being faux-styled onto a face the font does not have. Same
shape as Baskerville Old Face -> Bacasime Antique, one tier cleaner.

Restores a concise reviewed-record-to-package path so the row is added from
evidence, not by hand-editing the generated module: records.json is the only
file a reviewer edits, scripts/generate-data.ts renders src/data.ts from it,
and data-drift.test.ts re-renders in memory and fails if the checked-in
module ever drifts from the source.
@caio-pizzol caio-pizzol merged commit 6524290 into main Jun 6, 2026
1 check passed
@caio-pizzol caio-pizzol deleted the caio-pizzol/cooper-black-row branch June 6, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants