feat(fonts): experimental_getFontFileURL()#13729
feat(fonts): experimental_getFontFileURL()#13729florian-lefebvre wants to merge 4 commits intomainfrom
Conversation
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
ArmandPhilippot
left a comment
There was a problem hiding this comment.
Thanks, this looks great to me! 🙌🏽 I left a nit, but nothing blocking.
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
yanthomasdev
left a comment
There was a problem hiding this comment.
Thanks @florian-lefebvre, just two small nits from me
Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
ArmandPhilippot
left a comment
There was a problem hiding this comment.
I have two nits, but otherwise LGTM! Thanks for the update!
|
|
||
| This low-level API gives you access to all font files downloaded by Astro for your project, along with their metadata. This means that you are responsible for filtering font files to find the specific file you need, and for resolving the file path to use based on the build output structure. | ||
| - Font family data through the [`fontData`](/en/reference/modules/astro-assets/#fontdata) object | ||
| - Font file URLs with [`experimental_getFontFileURL()`](/en/reference/modules/astro-assets/#experimental_getfontfileurl) function. |
There was a problem hiding this comment.
| - Font file URLs with [`experimental_getFontFileURL()`](/en/reference/modules/astro-assets/#experimental_getfontfileurl) function. | |
| - Font file URLs with the [`experimental_getFontFileURL()`](/en/reference/modules/astro-assets/#experimental_getfontfileurl) function. |
|
|
||
| A new API is being developed to simplify this process and will be available in a future release. You can subscribe to the GitHub issue to follow its progress. | ||
| ::: | ||
| This low-level API gives you access to all font files downloaded by Astro for your project, along with their metadata. This means that you are responsible for filtering font files to find the specific file you need, and for fetching data after resolving URLs. |
There was a problem hiding this comment.
Rereading this, I think this can be confusing because we start with "two low-level APIs"... so which one is "this"? It might be better to be explicit:
| This low-level API gives you access to all font files downloaded by Astro for your project, along with their metadata. This means that you are responsible for filtering font files to find the specific file you need, and for fetching data after resolving URLs. | |
| The `fontData` object gives you access to all font files downloaded by Astro for your project, along with their metadata. This means that you are responsible for filtering font files to find the specific file you need, and for fetching data after resolving URLs. |
Description (required)
Related issues & labels (optional)
For Astro version:
6.2. See astro PR #16302.