Princesseuh / erika.florist

My website
https://erika.florist
91 stars 5 forks source link

feat: astro-font - optimize fonts & prevent CLS #17

Closed rishi-raj-jain closed 7 months ago

rishi-raj-jain commented 10 months ago

Astro Font: https://www.launchfa.st/blog/building-astro-font

Changes

This PR integrates astro-font which automatically generates the fallback font and pass it as the CSS Variable.

vercel[bot] commented 10 months ago

Someone is attempting to deploy a commit to a Personal Account owned by @Princesseuh on Vercel.

@Princesseuh first needs to authorize it.

vercel[bot] commented 10 months ago

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

Name Status Preview Comments Updated (UTC)
erika-florist ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 20, 2024 10:44pm
Princesseuh commented 10 months ago

It seems like it generates two style tags when it could merge them: image

It could do

src: url('anuphan.woff2') format('woff2'), url('anuphan.woff') format('woff');

in one style tag.

The fallback font is also in another style tag when it could all be in one

rishi-raj-jain commented 10 months ago

The fallback font is also in another style tag when it could all be in one

Sure, opening an issue for it.

Given our chat in Discord that you had concern about this being third party lib, would you be open to trying this out? Just asking so that it's comfortable with you for me to work on this.

Princesseuh commented 10 months ago

The fallback font is also in another style tag when it could all be in one

Sure, opening an issue for it.

Given our chat in Discord that you had concern about this being third party lib, would you be open to trying this out? Just asking so that it's comfortable with you for me to work on this.

Yeah, if those issues are fixed I'd most likely merge this PR! Curious to see the perf difference

Princesseuh commented 7 months ago

Not interested in this anymore, I'd rather do fonts myself