fix(ui): load Satoshi from a CDN that actually serves it - #295
Merged
Merged
Conversation
index.html asked Bunny Fonts for Satoshi alongside JetBrains Mono and Sora. Bunny does not carry Satoshi, so the returned stylesheet had no faces for it and every --font-sans and --font-display stack fell through to Inter or the system sans. The design system names Satoshi as the interface typeface; the shipped app has never rendered in it. Satoshi now loads from Fontshare at the cuts it ships (400/500/700/900; there is no 600, so those requests resolve to 700). The other two families stay on Bunny. Both Tauri CSPs allow api.fontshare.com for the stylesheet and cdn.fontshare.com for the files, the packaging test asserts the new allowlist, and the docs site template makes the same swap so it matches the app. The design system records the two sources. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017QqD4e2C7kLCBtZBEfJyTx
|
Warning Review limit reached
On-demand reviews are free for the next 5 days. After that, they cost $0.25 per reviewed file. Or wait 43 minutes for your next included review. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
Comment |
Static Satoshi ships no 600 cut, and the app uses font-semibold on dozens of Satoshi-rendered elements, so the static request would have pushed all of them to 700 the moment the face started loading. The variable face carries a 300 to 900 weight axis, so 600 renders as a true 600. The stylesheet origin gets its own preconnect: Fontshare splits the CSS and the files across two hosts, and the CSS is on the critical path before the browser can discover the file URLs. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017QqD4e2C7kLCBtZBEfJyTx
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.
The app's
index.htmlasks Bunny Fonts for Satoshi, JetBrains Mono, and Sora in one request. Bunny does not carry Satoshi: the CSS it returns has@font-facerules for the other two and nothing for Satoshi, so every--font-sansand--font-displaystack has fallen through to Inter (where installed) or the system sans since the fonts were introduced. The design system describes Satoshi as the interface typeface; the shipped app has never rendered in it.💡 What changes
Satoshi now loads from Fontshare, the foundry's own CDN and the only one that serves it, as its variable face (weight axis 300 to 900, upright and italic). The variable face matters: static Satoshi has no 600 cut, and the app uses
font-semiboldon dozens of Satoshi-rendered elements, so a static request would have pushed all of them to 700 the moment the face started loading. JetBrains Mono and Sora stay on Bunny. Both Fontshare origins get a preconnect, since the stylesheet and the files live on different hosts and the CSS is on the critical path. The Tauri CSP gainshttps://api.fontshare.comunderstyle-srcandhttps://cdn.fontshare.comunderfont-src, and the packaging test asserts the new allowlist. The Zola docs template and the docs theme page make the same swap so the docs site matches the app. The design system's typography section now names the two sources, records why, and notes that every weight the scale asks for renders as a true instance.🧪 Validation
cargo test -p hypercolor-app --test packaging_tests: 53 passed with the widened CSP expectations on both the base and macOS configs (run locally against a placeholder UI dist, the same way CI does).cargo fmt --checkclean on the test edit.satoshi@1,2request returns exactly two@font-facerules (upright and italic,font-weight: 300 900), every source oncdn.fontshare.com; Bunny returns zero rules forfamily=satoshi. The downloaded file carries awghtaxis 300 to 900 (checked with fontTools).🤖 Generated with Claude Code
https://claude.ai/code/session_017QqD4e2C7kLCBtZBEfJyTx