Skip to content

Conversation

@florian-lefebvre
Copy link
Member

@florian-lefebvre florian-lefebvre commented May 5, 2025

Changes

  • Closes Unable to use the experimental font API with Typekit #13743
  • Until this PR, we assumed the font files urls returned by providers would end with a file extension eg. .woff2
  • However this is not always the case (eg. adobe)
  • To fix this, I moved the type extraction so that remote providers and local providers handle it differently
    • local provider: keep the previous behavior ie. extract the type from the url
    • remote provider: try use source.format (given by unifont) then fallback to extracting the type from the url

Testing

Tests updated and added. Affected user confirmed it works using the preview release

Docs

Changeset

@florian-lefebvre florian-lefebvre self-assigned this May 5, 2025
@changeset-bot
Copy link

changeset-bot bot commented May 5, 2025

🦋 Changeset detected

Latest commit: f868f26

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

@github-actions github-actions bot added pkg: example Related to an example package (scope) pkg: astro Related to the core `astro` package (scope) labels May 5, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented May 5, 2025

CodSpeed Performance Report

Merging #13752 will not alter performance

Comparing fix/fonts-urls-without-extension (f868f26) with main (d874fe0)

Summary

✅ 6 untouched benchmarks

@florian-lefebvre florian-lefebvre added the pr preview Apply this label to a PR to generate a preview release label May 5, 2025
@github-actions github-actions bot removed the pr preview Apply this label to a PR to generate a preview release label May 5, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented May 5, 2025

astro

npm i https://pkg.pr.new/astro@13752

@astrojs/cloudflare

npm i https://pkg.pr.new/@astrojs/cloudflare@13752

@astrojs/netlify

npm i https://pkg.pr.new/@astrojs/netlify@13752

@astrojs/node

npm i https://pkg.pr.new/@astrojs/node@13752

@astrojs/vercel

npm i https://pkg.pr.new/@astrojs/vercel@13752

commit: f9d3ec4

@github-actions github-actions bot removed the pkg: example Related to an example package (scope) label May 8, 2025
@florian-lefebvre florian-lefebvre marked this pull request as ready for review May 8, 2025 08:09
@florian-lefebvre florian-lefebvre merged commit a079c21 into main May 8, 2025
16 checks passed
@florian-lefebvre florian-lefebvre deleted the fix/fonts-urls-without-extension branch May 8, 2025 15:00
@astrobot-houston astrobot-houston mentioned this pull request May 8, 2025
openscript pushed a commit to openscript/astro that referenced this pull request Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to use the experimental font API with Typekit

2 participants