Repository navigation
feat(ui): switch the interface typeface to Rethink Sans - #176
Merged
Merged
Conversation
Deploying sahajatlas-design with
|
| 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 |
Deploying sahajatlas with
|
| Latest commit: |
d67884d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://155e07fe.sahajatlas.pages.dev |
| Branch Preview URL: | https://feat-rethink-sans.sahajatlas.pages.dev |
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]>
Ardnived
force-pushed
the
feat/rethink-sans
branch
from
August 28, 2026 22:58
8951cae to
d67884d
Compare
25 of 35 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 tomainnow (#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-sansships latin and latin-ext only, and the widget shipsruanduk. 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-rangeis for.Verified in Chrome from the network log:
rethink-sans-latin-wght-normal.woff2raleway-cyrillic-wght-normal.woff2font-weightis now per subsetIt was one constant. Rethink Sans's axis is
400 800; Raleway's is100 900. Declaring a range a file does not have makes the browser synthesise the weight instead of interpolating the axis.fonts.test.tspins 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-facecarries 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 isAtlas Rethink Sans, and the build gate's allowlist moves with it.Mapbox/themes.tsderives from the exportedFONT_FAMILYand needed no edit — that indirection is why it exists.Also
ListItem's subtitle was the repo's onlyfont-light, which clamps to 400 on the new axis. It now saysfont-normal, which is what it renders.Host-observable, so
docs/embedding.mdandCHANGELOG.mdmove 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) ·sizeall 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