Repository navigation
Load Fira Code from the npm package again, so builds work offline - #1303
Merged
Merged
Conversation
The fontsource provider downloads the font files from api.fontsource.org at build time, so the site couldn't be built without network access, for example in the Nix sandbox. Built with no network, it fails with "Could not fetch from `https://api.fontsource.org/v1/fonts`". The local provider now takes the files from @fontsource-variable/fira-code, as it does for Inter from inter-ui, and Dependabot keeps them updated again. Each subset's unicode-range comes from the package's unicode.json rather than being copied into the config, so the ranges stay in step with the files when the package is updated. The same three subsets (latin, latin-ext and symbols2) are served, and the generated files are byte-identical to the package's.
trespaul
approved these changes
Oct 23, 2026
trespaul
left a comment
Contributor
There was a problem hiding this comment.
Thanks! Glad to have been helpful :)
friedow
approved these changes
Oct 23, 2026
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 fontsource provider downloads the font files from api.fontsource.org at build time, so the site couldn't be built without network access, for example in the Nix sandbox. It "works" today only because the Astro site is built with npm on the runner and on Netlify, not in a Nix derivation. When built with no network, it fails with "Could not fetch from
https://api.fontsource.org/v1/fonts".Thanks to @trespaul for the warning about this.