Skip to content

feat(ui): switch the interface typeface to Rethink Sans - #176

Merged
sydevs-bot merged 1 commit into
mainfrom
feat/rethink-sans
Aug 29, 2026
Merged

sydevs-bot merged 1 commit into
mainfrom
feat/rethink-sans

Conversation

@Ardnived

@Ardnived Ardnived commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Rebuilt as typeface-only, based directly on main. It previously sat at the top of a three-PR stack and carried the design-revision and icon work with it; both have their own path to main now (#175 merged, icons in #178), so this is one commit touching ten files and nothing else. Merge whenever the typeface has been evaluated — there is no longer anything else waiting behind it.

Rethink Sans replaces Raleway, for its number alignment. Still self-hosted, so the CSP contract is unchanged and no visitor IP reaches a font CDN.

⚠ Raleway stays, for Cyrillic

@fontsource-variable/rethink-sans ships latin and latin-ext only, and the widget ships ru and uk. A straight swap would drop both locales to the visitor's system sans.

So the Raleway Cyrillic face is retained and claims the Cyrillic range under the same family name. The browser resolves per codepoint, and the two faces cannot meet inside a word — no script is served by both, which is what unicode-range is for.

Verified in Chrome from the network log:

  • Latin text → fetches rethink-sans-latin-wght-normal.woff2
  • Cyrillic text → fetches raleway-cyrillic-wght-normal.woff2

font-weight is now per subset

It was one constant. Rethink Sans's axis is 400 800; Raleway's is 100 900. Declaring a range a file does not have makes the browser synthesise the weight instead of interpolating the axis.

fonts.test.ts pins all three weights and pins that Cyrillic still comes from Raleway — the assertion that catches a future straight swap. Both regressions were reintroduced and confirmed red before the specs were kept.

The family name keeps its namespace

The original brief asked for plain Raleway, calling it a naming fix. It is not: @font-face carries no selector, cannot be scoped, and lands in the host's document — the plain name would override the faces of any embedding site self-hosting that typeface. A test exists specifically to forbid it. So the family is Atlas Rethink Sans, and the build gate's allowlist moves with it.

Mapbox/themes.ts derives from the exported FONT_FAMILY and needed no edit — that indirection is why it exists.

Also

ListItem's subtitle was the repo's only font-light, which clamps to 400 on the new axis. It now says font-normal, which is what it renders.

Host-observable, so docs/embedding.md and CHANGELOG.md move in the same commit. The changelog entry is deliberately placed at the end of the Unreleased "Changed" list rather than the top, so it cannot collide with #178's entry whichever of the two lands first.

Verification

lint · typecheck · test:run (1399) · build (incl. assert:css) · size all green on this branch. Exactly three font assets emitted — two Rethink Sans, one Raleway Cyrillic — with no stray Raleway latin files.

🤖 Generated with Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Deploying sahajatlas-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: d67884d
Status: ✅  Deploy successful!
Preview URL: https://3a5717f8.sahajatlas-design.pages.dev
Branch Preview URL: https://feat-rethink-sans.sahajatlas-design.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Deploying sahajatlas with  Cloudflare Pages  Cloudflare Pages

Latest commit: d67884d
Status: ✅  Deploy successful!
Preview URL: https://155e07fe.sahajatlas.pages.dev
Branch Preview URL: https://feat-rethink-sans.sahajatlas.pages.dev

View logs

Base automatically changed from feat/design-tokens-retune to main August 28, 2026 22:41
Rethink Sans replaces Raleway, for its number alignment. Still self-hosted, so
the CSP contract is unchanged and no visitor IP reaches a font CDN.

**Raleway stays, for Cyrillic only.** `@fontsource-variable/rethink-sans` ships
latin and latin-ext and nothing else, and the widget ships `ru` and `uk` — a
straight swap would drop both locales to the visitor's system sans. Instead the
Cyrillic face is retained and claims the Cyrillic range under the SAME family
name, so the browser resolves per codepoint. The two faces cannot meet inside a
word: no script is served by both. Verified in Chrome — Latin text fetches
`rethink-sans-latin-wght-normal.woff2`, Cyrillic text fetches
`raleway-cyrillic-wght-normal.woff2`.

**`font-weight` is now per subset**, where it was one constant. Rethink Sans's
variable axis is `400 800`; Raleway's is `100 900`. Declaring a range the file
does not have makes the browser synthesise the weight rather than interpolate
the axis. `fonts.test.ts` pins all three, and pins that Cyrillic still comes from
Raleway — the assertion that catches the straight swap.

The family name keeps its namespace (`Atlas Rethink Sans`, not `Rethink Sans`):
`@font-face` is document-global and ours is registered last, so a plain name
would override that face on a host page self-hosting the same typeface. The
build gate's allowlist moves with it.

`ListItem`'s subtitle was the repo's only `font-light`, which clamps to 400 on
the new axis; it now says `font-normal`, which is what it renders.

Host-observable, so `docs/embedding.md` and `CHANGELOG.md` move in the same
commit.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@sydevs-bot
sydevs-bot merged commit 6e5ade7 into main Aug 29, 2026
5 checks passed
@sydevs-bot
sydevs-bot deleted the feat/rethink-sans branch August 29, 2026 15:04
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