Skip to content

Conversation

@florian-lefebvre
Copy link
Member

@florian-lefebvre florian-lefebvre commented Jan 13, 2026

Todo

Changes

  • We have APIs to allow using font data programmatically, which was mainly designed for advanced usage such as OG images
  • However, getting the font better has always been clunky. It actually didn't work during prererendering
  • This PR introduces a new getFontBuffer() function that get the buffer using a url from the result of getFontData()
  • In SSR if getFontData() is used, a js file is created per buffer in the server output in addition to actual files in the client output. Not sure there's much we can do about it
  • On the client, calling the function always throws

Testing

  • New unit test
  • Add ssr integrated tests
  • Add integrated tests

Docs

@florian-lefebvre florian-lefebvre self-assigned this Jan 13, 2026
@changeset-bot
Copy link

changeset-bot bot commented Jan 13, 2026

🦋 Changeset detected

Latest commit: f57bdd0

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 the pkg: astro Related to the core `astro` package (scope) label Jan 13, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 13, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing feat/get-font-buffer (f57bdd0) with main (37ab65a)1

Summary

✅ 9 untouched benchmarks

Footnotes

  1. No successful run was found on main (7f449b7) during the generation of this report, so 37ab65a was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants