Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ui): replace external Inter font with local variable fonts #328

Merged
merged 5 commits into from
Dec 2, 2024

Conversation

drichar
Copy link
Collaborator

@drichar drichar commented Dec 2, 2024

Description

This PR replaces the external Inter font stylesheet with locally hosted variable and static fonts. This change improves performance by eliminating an external network request, provides better fallback support, and optimizes font loading through WOFF2 compression and limited weight ranges.

Details

  • Remove external Inter font stylesheet from index.html
  • Add local Inter variable fonts for normal and italic styles
  • Add static font fallbacks for weights 400-700 and italic variants
  • Limit variable font weight range to match static fonts (400-700)
  • Configure Tailwind to use local fonts with proper fallback chain
  • Add optimized WOFF2 fonts with TTF fallbacks
  • Standardize font format fallbacks across all font families

- Remove external Inter font stylesheet from index.html
- Add local Inter variable font declarations to main.css
- Configure Tailwind to use InterVariable as primary font
- Add static Inter font declarations for weights 400-700
- Add italic variants for weights 400-500
- Configure Tailwind to use static Inter fonts as fallback
- Rename variable font files
- Add WOFF2 format for variable and static Inter fonts
- Keep TTF as fallback for older browsers
- Update font-face declarations to use both formats
- Maintain existing font weights and styles
- Remove WOFF format from Algo font declaration
- Keep only WOFF2 and TTF formats for consistency
- Match fallback pattern used by Inter fonts
Copy link

vercel bot commented Dec 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
reti ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 2, 2024 9:06pm

@drichar drichar merged commit 3f8b7a2 into dev Dec 2, 2024
4 of 5 checks passed
@drichar drichar deleted the feat/ui-local-inter-font branch December 2, 2024 22:14
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.

1 participant