Conversation
🦋 Changeset detectedLatest commit: fe4bcce The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
CodSpeed Performance ReportMerging #13826 will not alter performanceComparing Summary
Footnotes |
astro
@astrojs/cloudflare
@astrojs/netlify
@astrojs/node
@astrojs/vercel
commit: |
|
Seems to be working perfectly for me! Thanks a lot for working on this! |
|
Is the repo public? If not a minimal repro would help, it's basically impossible to guess just from this |
|
I cloned the repo locally and I don't get any warnings in the console (tested on Brave and Firefox) |
|
Hmm wonder what the discrepancy is? I'm also using firefox and experienced the exact same thing I posted images of (3 unused preload warnings and 3 network requests) 🤔 Even in incognito I still get it |
|
I just tested this in Firefox and I get the errors. And it also seems to be using the 700 weight when its set to use the 400. I did some more digging and I think this may just be a bug for preloading fonts in Firefox itself. https://bugzilla.mozilla.org/buglist.cgi?quicksearch=Preload+Fonts |
|
Issue was that by default several subsets are loaded. Adding |
|
And to further clarify the font-weight was wrong because I didn't apply one via the CSS in my minimal repro That is also working correctly now too 👍 Awsome work @florian-lefebvre ! |
|
It would be nice to support preloading certain subsets, but still making the other subsets available in case I use a rare character in one page. My brief testing seemed to show the |
|
Good idea! Unfortunately, we currently do not have access to the |
ascorbic
left a comment
There was a problem hiding this comment.
It would be good to explain in the changeset the behaviour with variable fonts
|
|
||
| function checkWeight(input: string, target: string): boolean { | ||
| // If the input looks like "100 900", we check it as is | ||
| if (input.includes(' ')) { |
There was a problem hiding this comment.
I'd trim both before all of these, because a stray leading or trailing space could mess up the logic
There was a problem hiding this comment.
Yeah good idea! I won't trim the target tho because it comes from the provider, so it's its responsability to handle variable weights correctly
sarah11918
left a comment
There was a problem hiding this comment.
Quick comments from me, but I've also reviewed the docs PR which will inform the changeset here, I think!
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
sarah11918
left a comment
There was a problem hiding this comment.
Just caught an extra code fence in the code block, but otherwise changeset LGTM! 🎉
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>




Changes
Testing
renderFontWeightorchestrateunit tests to verify we collect the weight/style preload dataDocs