feat(core): bundle Inter variable fonts in default styles#318
Merged
Conversation
interacsean
approved these changes
Jun 16, 2026
| @@ -0,0 +1,78 @@ | |||
| /* Auto-generated by scripts/generate-fonts.mjs — do not edit manually. */ | |||
Contributor
There was a problem hiding this comment.
I'm making a note to do a sweep for auto-generated files and see if we can remove them from source control and have the generation of them be a part of build and packaging
But good for now
Contributor
Author
There was a problem hiding this comment.
After digging things in a bit last night, I found that we don't have to have the whole font-generation pipeline, because I just misused @fontsource-variable/inter package.
I pushed some changes that simplifies everything in this PR just by adding .css suffix in importing @fontsource-variables/inter package that works out both for Vite and Next.js apps.
- Add @fontsource-variable/inter dependency - Add scripts/generate-fonts.mjs to auto-scan fontsource packages and generate CSS - Add pre-generated fonts.generated.css with @font-face declarations - Add woff2 font files for Inter (all subsets) - Add appendFonts Vite plugin to append font CSS to bundle at build time - Remove Geist font imports from nextjs-app example (replaced by bundled Inter)
984523e to
e4655e4
Compare
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.
Summary
Bundle Inter variable font into the default
@tailor-platform/app-shellstyles, so consumers get a consistent font without extra configuration.Extracted from #306 (font delivery portion only).
Changes
@fontsource-variable/interadded as a dependencysrc/index.ts— import@fontsource-variable/inter/wght.cssso the font is included in the CSS bundle automaticallysrc/assets/theme.css— set--font-sansto"Inter Variable"with fallbacksexamples/nextjs-app— remove Geist font imports from layout (replaced by bundled Inter)