Skip to content

Commit 7db2fda

Browse files
address sarah's feedback (#15280)
1 parent c775fce commit 7db2fda

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

.changeset/dull-cities-hang.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Updates how the local provider must be used when using the experimental Fonts AP
88

99
Previously, there were 2 kinds of font providers: remote and local.
1010

11-
Font providers are now unified. If you are using the local provider, here is how you can update:
11+
Font providers are now unified. If you are using the local provider, the process for configuring local fonts must be updated:
1212

1313
```diff
1414
-import { defineConfig } from "astro/config";
@@ -40,3 +40,7 @@ export default defineConfig({
4040
}
4141
});
4242
```
43+
44+
Once configured, there is no change to using local fonts in your project. However, you should inspect your deployed site to confirm that your new font configuration is being applied.
45+
46+
See [the experimental Fonts API docs](https://docs.astro.build/en/reference/experimental-flags/fonts/) for more information.

.changeset/floppy-bikes-lick.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Exposes `root` on `FontProvider` `init()` context
66

7-
When building a `FontProvider` for the experimental Fonts API, the `init()` method receives a `context`. This context now exposes a `root` URL, useful for resolving local files:
7+
When building a custom `FontProvider` for the experimental Fonts API, the `init()` method receives a `context`. This context now exposes a `root` URL, useful for resolving local files:
88

99
```diff
1010
import type { FontProvider } from "astro";

packages/astro/src/core/errors/errors-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,7 @@ export const FontBufferNotFound = {
14121412
name: 'FontBufferNotFound',
14131413
title: 'Font buffer not found',
14141414
message: (url: string) =>
1415-
`No buffer was found for the \`"${url}"\` url passed to the \`getFontBuffer()\` function.`,
1415+
`No buffer was found for the \`"${url}"\` URL passed to the \`getFontBuffer()\` function.`,
14161416
hint: 'Make sure you pass a valid URL, obtained via the \`fontData\` object.',
14171417
} satisfies ErrorData;
14181418

0 commit comments

Comments
 (0)