Skip to content

Replace Switzer with Hanken Grotesk - #55

Open
holkexyz wants to merge 2 commits into
mainfrom
holke/tech-865-replace-switzer-with-hanken-grotesk-and
Open

holkexyz wants to merge 2 commits into
mainfrom
holke/tech-865-replace-switzer-with-hanken-grotesk-and

Conversation

@holkexyz

@holkexyz holkexyz commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Why

Switzer's license (ITF Free Font License v2.0) does not allow redistribution, and a public repository counts. Hanken Grotesk is under the SIL Open Font License 1.1 with no Reserved Font Name, so it can live here. This uses the standard, unmodified files from the official Hanken Grotesk repository.

What changed

All in the endpoint explorer (docs/), so no Changeset is needed.

  • docs/public/fonts/Switzer-Variable.woff2 is deleted and docs/public/fonts/HankenGrotesk-Variable.woff2 added, with its license as OFL-HankenGrotesk.txt.
  • docs/web/src/styles.css: the @font-face now declares "Hanken Grotesk" (weights 100 to 900, normal style only), and --body-font-family names it first. The fallback stack is the same. Scalar keeps reading it through --scalar-font.
  • docs/test/vite-openapi.test.mjs: the byte-for-byte asset test now checks the Hanken Grotesk file and its hash.
  • docs/README.md: the font note now names both fonts and both license files.
  • No sizes, weights, tracking or line heights changed. There is still no italic body face, and :root sets font-synthesis: none, so the browser does not synthesize one: italic body text renders upright, as it did with Switzer.

Design-system package

@hypercerts-org/ui-react 0.2.0 sets --font-body to Switzer on :root, and its Button, Input and Select read it through --hc-font-body. The site's :root now sets --font-body: var(--body-font-family) after importing the package's CSS, so those components use Hanken Grotesk too. This is a variable override; no alias @font-face was needed. The built CSS still contains the package's own "Switzer Variable" string until the package is upgraded, but nothing loads a Switzer file.

License files

Each font now has its own license file in docs/public/fonts/, named for the font:

  • OFL-HankenGrotesk.txt: Hanken Grotesk's license, renamed from the generic OFL.txt added in the first commit.
  • OFL-InstrumentSerif.txt: Instrument Serif's license, new. The Instrument Serif files were already in the repo without one. The file is unchanged from google/fonts (ofl/instrumentserif/OFL.txt, SHA-256 129ed761…).

Both fonts are under the SIL Open Font License 1.1.

How I verified it

  • pnpm install --frozen-lockfile.
  • pnpm lint and pnpm format:check: pass.
  • pnpm --filter hypercerts-api-endpoints test: 17 passed, including the font asset test.
  • pnpm --filter hypercerts-api-endpoints build (tsc --noEmit and vite build): pass.
  • pnpm --filter @hypercerts-org/api check: pass.
  • pnpm --filter @hypercerts-org/happyview-modules check could not run on my machine: it needs luacheck and a lua binary, neither installed (Luacheck is missing; spawnSync lua ENOENT). Its unit tests give the same result on main and on this branch: 154 pass, 206 fail. This PR does not touch that package. For the same reason I pushed without the pre-push hook; CI runs the full check.
  • Served docs/dist/ locally and checked it in headless Chrome with CSS.getPlatformFontsForNode. The header, the server Select, the Scalar reference text, headings and links all rendered with the web font HankenGrotesk (Regular, Medium, SemiBold instances). The one exception is the ↓ arrow in the "OpenAPI JSON" link: Hanken Grotesk has no glyph for it, so it falls back to the system font.
  • git grep -i switzer returns nothing.
  • Second commit (license files): pnpm lint, pnpm format:check, pnpm --filter hypercerts-api-endpoints test (17 passed), pnpm --filter @hypercerts-org/api check, the happyview-modules check:generated and typecheck, and pnpm build: all pass. The Lua lint and unit tests still need luacheck and lua, so this push also skipped the pre-push hook; CI's pnpm check installs luacheck and runs the full check. The built docs/dist/fonts/ holds both license files.

Removing the old Switzer file from git history is a separate decision and was not done here.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Changes
    • Updated the documentation site to use Hanken Grotesk instead of Switzer.
    • Added license information for Hanken Grotesk and Instrument Serif.

Switzer's license (ITF Free Font License v2.0) does not allow
redistribution, including through a public repository. Hanken Grotesk
is under the SIL Open Font License 1.1.

Swap the self-hosted variable woff2 for the official Hanken Grotesk
file and add its OFL.txt. Point --body-font-family at "Hanken Grotesk",
and set --font-body to the same stack so the @hypercerts-org/ui-react
components (which read it through --hc-font-body) follow. Update the
asset test and the README's font note. Sizes, weights and fallbacks are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
api-endpoints Ready Ready Preview Nov 10, 2026 1:13pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The documentation site now uses Hanken Grotesk instead of Switzer. The asset test checks the Hanken Grotesk font URL and digest. The README and added license files document SIL Open Font License 1.1 terms for Hanken Grotesk and Instrument Serif.

Changes: Font update

Layer / File(s) Summary
Update the site font reference
docs/web/src/styles.css, docs/test/vite-openapi.test.mjs
The CSS uses Hanken Grotesk in the font-face declaration and body font stack, and adds a --font-body alias. The asset test checks the Hanken Grotesk URL and digest.
Add font license notices
docs/README.md, docs/public/fonts/OFL-HankenGrotesk.txt, docs/public/fonts/OFL-InstrumentSerif.txt
The README identifies both fonts as licensed under SIL Open Font License 1.1 and links to their license files. The files contain the license terms.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: kzoeps

Merge Risk: Minimal · up to 6de5b

Hanken Grotesk replaces Switzer and license notices are included. No merge-blocking risk was identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: replacing Switzer with Hanken Grotesk.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (4 skipped: 4 unsupported.)

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Biome (2.5.15)

docs/test/vite-openapi.test.mjs

Biome could not lint this file: configuration resulted in errors. Check the repository's Biome configuration and plugins.

docs/web/src/styles.css

Biome could not lint this file: configuration resulted in errors. Check the repository's Biome configuration and plugins.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 41cbedf1-8b50-4c47-ac38-f0309964fcd1
Commits

Reviewing files that changed from the base of the PR and between f827b66 and 6de5bd8.

Files ignored due to path filters: 2

  • docs/public/fonts/HankenGrotesk-Variable.woff2 is excluded by !**/*.woff2
  • docs/public/fonts/Switzer-Variable.woff2 is excluded by !**/*.woff2
Files selected for processing: 5

  • docs/README.md
  • docs/public/fonts/OFL-HankenGrotesk.txt
  • docs/public/fonts/OFL-InstrumentSerif.txt
  • docs/test/vite-openapi.test.mjs
  • docs/web/src/styles.css

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@changeset-bot

changeset-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6de5bd8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Rename the generic OFL.txt, which is Hanken Grotesk's license, to
OFL-HankenGrotesk.txt, and add Instrument Serif's license as
OFL-InstrumentSerif.txt, taken unchanged from google/fonts
(ofl/instrumentserif/OFL.txt). Both fonts are under the SIL Open Font
License 1.1, and each license now sits next to the fonts it covers. The
README's font note names both files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

@holkexyz
holkexyz marked this pull request as ready for review November 10, 2026 14:56
@holkexyz
holkexyz requested a review from Kzoeps November 10, 2026 15:07

This branch was successfully deployed

1 active deployment
Preview — 6de5bd88 Deployed Nov 10, 2026 by vercel[bot]
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