From 55d8e2498f17df025c72f6c16571b1e531c395bd Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 11 Oct 2026 19:05:23 +0000 Subject: [PATCH] shots: glyph coverage check per language, automatic Noto fallbacks, check errors on fallback / system-font glyphs Lilita One lacks most of Latin Extended-A (Turkish s-cedilla, g-breve, dotted I ...), so Turkish titles were drawn with a silent browser fallback while shots check passed. shots fonts now reads the cmap of every face (pure TS, TTF/OTF/WOFF/WOFF2), adds a Noto fallback per missing character or fails with language + characters; render measures which face drew each character (CDP probes) and records it in report.json; check errors on fallbacks the config did not choose (shots.fonts.fallback) and on system-font glyphs. Default game title font: Paytone One. --- CHANGELOG.md | 15 ++ README.md | 23 +- cli/lib/config.ts | 7 +- cli/shots/caption.html | 2 +- cli/shots/cmap.ts | 125 ++++++++++ cli/shots/feature-app.html | 2 +- cli/shots/feature.html | 2 +- cli/shots/fonts.ts | 99 +++++--- cli/shots/glyphs.ts | 317 ++++++++++++++++++++++++ cli/shots/lib.ts | 7 +- cli/shots/render.ts | 56 ++++- cli/shots/report.ts | 11 +- cli/shots/spec.ts | 2 +- cli/shots/template-app.html | 6 +- cli/shots/template.html | 6 +- cli/shots/video.ts | 3 +- examples/demo-game/storebound.config.ts | 2 +- skills/store-screenshots/SKILL.md | 15 +- templates/storebound.config.ts | 4 +- tests/gallery.test.ts | 2 +- tests/glyphs.test.ts | 220 ++++++++++++++++ tests/specs.test.ts | 2 +- 22 files changed, 859 insertions(+), 69 deletions(-) create mode 100644 cli/shots/cmap.ts create mode 100644 cli/shots/glyphs.ts create mode 100644 tests/glyphs.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index c603030f..d2a608d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,21 @@ ## Unreleased +- Screenshot glyphs (a Turkish render showed fallback glyphs for "ş" / "ğ" while `shots check` passed): the cause was + not subsetting (css2 `text=` already takes glyphs from every subset) but the title font: Lilita One has no ş ğ İ and + most of Latin Extended-A, so Chrome silently drew them with another font. + - `shots fonts` checks every character of every language (copy.json + config languages) against the cmap of the + faces that draw it (new pure-TS cmap reader for TTF / OTF / TTC / WOFF / WOFF2, no dependency), adds an automatic + Noto fallback per missing character (Noto Sans Display for titles at a heavy weight, Noto Sans, Noto Sans +