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

Proper font fallback #111

Merged
merged 2 commits into from
Oct 22, 2024
Merged

Proper font fallback #111

merged 2 commits into from
Oct 22, 2024

Conversation

sandhose
Copy link
Member

@sandhose sandhose commented Oct 21, 2024

This is a bit of a random one.
I got too annoyed of seeing a serif font when loading MAS with no cache, so I decided to fix this by providing good fonts fallbacks.

Problem with classic fallbacks, is that the layout will usually not be the same as the one you get with the font you actually want to use.
So, this is using @capsizecss/core to generate fine-tuned fallbacks which will use local fonts tweaked to match the metrics of the font you actually want to use.

Some comparison so that it makes more sense: (on slow 4G throttling)

Before
before.mov
After
after.mov

@sandhose sandhose requested a review from a team as a code owner October 21, 2024 15:09
Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

I'm not a web dev so I might have missed some details, but LGTM in general.

@sandhose sandhose force-pushed the quenting/font-fallback branch from 35fc608 to 9f4ed7f Compare October 22, 2024 07:17
@sandhose sandhose merged commit 976db67 into main Oct 22, 2024
3 checks passed
@sandhose sandhose deleted the quenting/font-fallback branch October 22, 2024 14:11
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