Skip to content

feat(core): bundle Inter variable fonts in default styles#318

Merged
IzumiSy merged 5 commits into
mainfrom
feat/bundled-fonts
Jun 17, 2026
Merged

feat(core): bundle Inter variable fonts in default styles#318
IzumiSy merged 5 commits into
mainfrom
feat/bundled-fonts

Conversation

@IzumiSy

@IzumiSy IzumiSy commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Bundle Inter variable font into the default @tailor-platform/app-shell styles, so consumers get a consistent font without extra configuration.

Extracted from #306 (font delivery portion only).

Changes

  • @fontsource-variable/inter added as a dependency
  • src/index.ts — import @fontsource-variable/inter/wght.css so the font is included in the CSS bundle automatically
  • src/assets/theme.css — set --font-sans to "Inter Variable" with fallbacks
  • examples/nextjs-app — remove Geist font imports from layout (replaced by bundled Inter)

@IzumiSy IzumiSy self-assigned this Jun 16, 2026
@IzumiSy IzumiSy requested a review from a team June 16, 2026 08:23
@@ -0,0 +1,78 @@
/* Auto-generated by scripts/generate-fonts.mjs — do not edit manually. */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@IzumiSy IzumiSy Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

IzumiSy added 5 commits June 17, 2026 10:13
- 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)
@IzumiSy IzumiSy force-pushed the feat/bundled-fonts branch from 984523e to e4655e4 Compare June 17, 2026 01:13
@IzumiSy IzumiSy merged commit c412f68 into main Jun 17, 2026
4 checks passed
@IzumiSy IzumiSy deleted the feat/bundled-fonts branch June 17, 2026 01:17
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