Skip to content

diff3proof: add waterfall, glyphset and spacing/kerning proofs - #34

Open
emmamarichal wants to merge 5 commits into
googlefonts:mainfrom
emmamarichal:add-waterfall-glyphs-spacing-proofs
Open

diff3proof: add waterfall, glyphset and spacing/kerning proofs#34
emmamarichal wants to merge 5 commits into
googlefonts:mainfrom
emmamarichal:add-waterfall-glyphs-spacing-proofs

Conversation

@emmamarichal

Copy link
Copy Markdown

@simoncozens @m4rc1e

Summary

diff3proof currently only generates one proof type: paragraphs of sample text (--sample-mode context) or a codepoint-coverage pangram (--sample-mode cover). This PR adds three more proof types that existed in the old diffenator2/gftools pipeline but have no equivalent in diffenator3 today — including for the "onboarding" case (a single font, no "before" version to diff against):

  • waterfall — the coverage pangram rendered at a ladder of point sizes (customizable via --waterfall-sizes), to spot hinting/ rasterization jumps.
  • glyphs — every encoded glyph in the font, laid out in a grid.
  • spacing — curated strings (ported from diffenator2's GF_Latin_Core Spacing/Kerning wordlists) that stress sidebearing consistency and kerning pairs. Latin-only for now; other scripts can follow the same pattern.

Design

--sample-mode is now repeatable (comma-separated), and all requested sections render into the same self-contained HTML file rather than one file per proof type:

diff3proof --sample-mode context,waterfall,glyphs,spacing font.ttf
diff3proof --sample-mode context,waterfall,glyphs,spacing before.ttf after.ttf

The default (--sample-mode omitted) is unchanged — same single context output as before.

Testing

  • All modes, individually and combined, in both single-font and before/after mode
  • --waterfall-sizes override
  • Graceful degradation: a font with minimal Latin coverage correctly omits the Spacing & Kerning section entirely, rather than rendering empty boxes
  • The existing before/after toggle (#fonttoggle) correctly flips all three new sections along with the existing ones, since they reuse the same .font-before/.font-after CSS classes
  • Default behavior (no --sample-mode flag) verified byte-for-byte identical to main
  • cargo fmt --all -- --check and cargo clippy --all-targets --all-features -- -D warnings both clean

Open questions

  1. Single combined HTML file with sections (what this PR does) vs. one file per proof type + an index page, closer to diffenator2's layout.
  2. Is Latin-only coverage acceptable for the spacing/kerning wordlist for now, with other scripts as follow-up work?
  3. Should --sample-mode be renamed (e.g. --proofs) now that it no longer only selects a sample of text, or kept as-is for compatibility with existing gftools qa invocations?

Images

Screenshot 2026-08-28 at 12 00 30 Screenshot 2026-08-28 at 12 00 38 Screenshot 2026-08-28 at 12 00 51

Extend SampleMode with Waterfall, Glyphs and Spacing variants, make
--sample-mode repeatable (comma-separated), and add --waterfall-sizes.
Independent, non-exclusive template blocks so several proof types
can appear on the same page.
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.

1 participant