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

Add dynamic font source for production #101

Closed
wants to merge 2 commits into from

Conversation

hminsky2002
Copy link
Collaborator

@hminsky2002 hminsky2002 commented Sep 17, 2024

This PR adds a dynamic css injection that changes the source of the font inter when the app is in production.

@reefdog this is still a draft because I wanted to check your thoughts on this approach. It seems pretty ugly but could be the most straightforward way to do this. Tested locally by running the npm run preview command, and it works (though font loading takes a second). Let me know your thoughts/feel free to pick it up if you are struck by a better approach!

@hminsky2002 hminsky2002 requested a review from reefdog September 17, 2024 23:59
@hminsky2002 hminsky2002 force-pushed the 100-font-in-production branch from 96fcc52 to 93da5a0 Compare September 18, 2024 00:10
@reefdog
Copy link
Collaborator

reefdog commented Sep 18, 2024

@hminsky2002 Oof, yeah, this is a bit ugly — but thanks for trying! Besides the complication, I don't like that we have to hardcode in a reference that will need updating any time the package updates. (I assume that's when the file signature changes.)

If we can't find a configuration or similar solution, then I think we may want to just point to the CDN.

@hminsky2002
Copy link
Collaborator Author

@reefdog yeahhhh this is definitely non-ideal. I'd be happy to just use the cdn for now and remove font-source for the time being?

@reefdog
Copy link
Collaborator

reefdog commented Sep 24, 2024

Decided to "solve" this an entirely different way: noncombatant…ism!

Closing this in favor of #108.

@reefdog reefdog closed this Sep 24, 2024
@reefdog reefdog deleted the 100-font-in-production branch September 24, 2024 22:36
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