Skip to content

fix(fonts): remove getFontBuffer()#15334

Merged
florian-lefebvre merged 4 commits intomainfrom
fix/fonts-remove-get-font-buffer
Jan 29, 2026
Merged

fix(fonts): remove getFontBuffer()#15334
florian-lefebvre merged 4 commits intomainfrom
fix/fonts-remove-get-font-buffer

Conversation

@florian-lefebvre
Copy link
Member

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

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

changeset-bot bot commented Jan 29, 2026

🦋 Changeset detected

Latest commit: 0fe3b4b

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: astro Related to the core `astro` package (scope) docs pr labels Jan 29, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 29, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing fix/fonts-remove-get-font-buffer (0fe3b4b) with main (388818a)1

Summary

✅ 9 untouched benchmarks

Footnotes

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

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick suggestion for the changeset!

@florian-lefebvre florian-lefebvre merged commit d715f1f into main Jan 29, 2026
25 of 26 checks passed
@florian-lefebvre florian-lefebvre deleted the fix/fonts-remove-get-font-buffer branch January 29, 2026 15:14
@astrobot-houston astrobot-houston mentioned this pull request Jan 29, 2026
florian-lefebvre added a commit that referenced this pull request Jan 30, 2026
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Emanuele Stoppa <[email protected]>
Co-authored-by: Matt Kane <[email protected]>
Co-authored-by:  Matthew Phillips <[email protected]>
Co-authored-by: Matthew Phillips <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Erika <[email protected]>
Co-authored-by: Sarah Rainsberger <[email protected]>
Co-authored-by: Armand Philippot <[email protected]>
Co-authored-by: matthewp <[email protected]>
Co-authored-by: florian-lefebvre <[email protected]>
Co-authored-by: ematipico <[email protected]>
Co-authored-by: Luiz Ferraz <[email protected]>
Co-authored-by: HiDeoo <[email protected]>
Co-authored-by: Princesseuh <[email protected]>
Co-authored-by: Chris Swithinbank <[email protected]>
Co-authored-by: Claude Opus 4.5 <[email protected]>
Co-authored-by: Antony Faris <[email protected]>
Co-authored-by: Erika <[email protected]>
Co-authored-by: Houston (Bot) <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Volpeon <[email protected]>
Co-authored-by: Martin Trapp <[email protected]>
Co-authored-by: fkatsuhiro <[email protected]>
Co-authored-by: Oliver Speir <[email protected]>
Co-authored-by: Andreas Deininger <[email protected]>
Co-authored-by: Roman <[email protected]>
Co-authored-by: fabon <[email protected]>
Co-authored-by: Raanelom <[email protected]>
Co-authored-by: Rahul Dogra <[email protected]>
Co-authored-by: James Garbutt <[email protected]>
Co-authored-by: Pegasus <[email protected]>
Co-authored-by: Cameron Smith <[email protected]>
Co-authored-by: Martin Trapp <[email protected]>
Co-authored-by: Rafael ヤスヒデ 須藤 <[email protected]>
Co-authored-by: Matthew Phillips <[email protected]>
Co-authored-by: Julien Cayzac <[email protected]>
Co-authored-by: Drew Powers <[email protected]>
Co-authored-by: Emanuele Stoppa <[email protected]>
Co-authored-by: MkDev11 <[email protected]>
Co-authored-by: andy <[email protected]>
Co-authored-by: Luky Setiawan <[email protected]>
Co-authored-by: btea <[email protected]>
Co-authored-by: cid <[email protected]>
Co-authored-by: Simen Sagholen Førrisdal <[email protected]>
Co-authored-by: Alex Launi <[email protected]>
Co-authored-by: Kedar Vartak <[email protected]>
Co-authored-by: yy <[email protected]>
Co-authored-by: Matheus Baroni <[email protected]>
Co-authored-by: Kevin Brown <[email protected]>
Co-authored-by: Eric Grill <[email protected]>
Co-authored-by: Cameron Pak <[email protected]>
Co-authored-by: Tony Narlock <[email protected]>
Co-authored-by: John Mortlock <[email protected]>
Co-authored-by: Patrick Arlt <[email protected]>
Co-authored-by: Mark Ignacio <[email protected]>
fix(ci): Reinstall deps after having published VS Code (#14996)
fix(svelte): allow client directives (#15004)
fix(assets): Fixes missing format option for svgs in the passthrough service (#14987)
fix(deps): update all non-major dependencies (#15020)
fix(content-layer): Try a smarter solution to normalize bare image paths in JSON (#15028)
fix(astro): assets vite build log (#15034)
resolved (#15033)
fix: Remote images: Prevent internal caching from interfering with Astro's cache (#14954)
fix(deps): update astro adapters (#15084)
fix(deps): update all non-major dependencies (#15072)
fix(deps): update astro client runtimes (#15085)
fix: move ts-plugin node_modules to dist (#15083)
fix: components imports paths (#15107)
fix(assets): Use Vite's isFileLoadingAllowed to check if a file can be loaded (#15052)
fix(vscode): Correctly handle TypeScript blocks ending with types (#15109)
fix(svelte): improve Svelte children prop type checking (#15070)
fix Firefox e2e tests for playwright 1.57 (#15113)
fix(deps): update astro dependencies (#15103)
fix: lint vt test (#15114)
fix(deps): update language tools (#15104)
resolver abstraction (#15111)
fix(vue): add HTML attributes to generated TypeScript types (#15016)
Fixes #14686
fix(vscode): Don't update @types/vscode automatically (#15131)
fix: adjust page warning to only show up in more relevant times (#15127)
fix(dev): preserve query params when base path is stripped (#15124)
fix(assets): hoist ?? inside JSON.stringify in virtual module codegen (#15140)
fix(toolbar): skip image audit for framework components (#15149)
Fixes #15048
fix: Accept setCookie from both context and headers (#15152)
fix(ci): Move ts-plugin-bundle to node_modules after recreating node_modules (#15156)
fix: scripts not rendering with unused Fragment slots (#13847) (#15147)
Fix hydration for framework components in MDX slots (#15150)
fix(deps): update astro adapters (#15173)
fix: fix image 500 error when moving dist directory in standalone Node (#15169)
fix: Allow node: prefix for Node builtins for Vercel middleware (#14863)
fix: Allow node: prefix for Node builtins for Vercel middleware (#14839)"
fix(node): hash URL stripping (#15196)
fix(core): add defensive validation for mod.page in App.render (#15148)
fix(css): rewrite absolute URLs with base path in dev mode (#14622)
Closes #14585
fix(docs): replace outdated Astro docs links (#15199)
fix(lint): Move ESLint comment (#15216)
fix: update devalue to the latest (#15222)
fix(css): prevent CSS double-bundling (#14991) (#15017)
Fixes #14991
fix: assets referenced via js chunks are not flagged as orphaned (#14607)
fix(build): Prevent duplicate CSS for hydrated client components" (#14612)"
Fixes #14252
fix(deps): update astro client runtimes (#15240)
fix(deps): update astro adapters (#15243)
fix(deps): update astro dependencies (#15241)
fix(deps): update dependency prettier to ^3.8.0 (#15244)
fix(deps): update all non-major dependencies (#15242)
Fix greedy regex in error message markdown rendering (#15230)
Fixes #15068
fixes: #15252
fix: prevent font copying when stopping dev server with q+enter (#15178)
fix: renovate config typo (#15256)
Fixes #15251
fix: typo in comment (#15232)
fix(deps): update dependency svelte to v5.46.4 [security] (#15220)
fix: add favicon.ico fallbacks to all examples (#15262)
fix(cli): add .vercel to .gitignore when using astro add vercel (#15185)
Closes #15058
fix(fonts): font providers as class instances (#15286)
Fix: Remove await from getActionResult JSDoc example (#15304)
fix(errors): Only style valid URLs in the error overlay (#15324)
fix(fonts): remove getFontBuffer() (#15334)
dadezzz pushed a commit to dadezzz/ice-notes that referenced this pull request Feb 7, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`5.16.15` → `5.17.1`](https://renovatebot.com/diffs/npm/astro/5.16.15/5.17.1) | ![age](https://developer.mend.io/api/mc/badges/age/npm/astro/5.17.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/astro/5.16.15/5.17.1?slim=true) |

---

### Release Notes

<details>
<summary>withastro/astro (astro)</summary>

### [`v5.17.1`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#5171)

[Compare Source](https://github.com/withastro/astro/compare/[email protected]@5.17.1)

##### Patch Changes

- [#&#8203;15334](withastro/astro#15334) [`d715f1f`](withastro/astro@d715f1f) Thanks [@&#8203;florian-lefebvre](https://github.com/florian-lefebvre)! - **BREAKING CHANGE to the experimental Fonts API only**

  Removes the `getFontBuffer()` helper function exported from `astro:assets` when using the experimental Fonts API

  This experimental feature introduced in v15.6.13 ended up causing significant memory usage during build. This feature has been removed and will be reintroduced after further exploration and testing.

  If you were relying on this function, you can replicate the previous behavior manually:

  - On prerendered routes, read the file using `node:fs`
  - On server rendered routes, fetch files using URLs from `fontData` and `context.url`

### [`v5.17.0`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#5170)

[Compare Source](https://github.com/withastro/astro/compare/[email protected]@5.17.0)

##### Minor Changes

- [#&#8203;14932](withastro/astro#14932) [`b19d816`](withastro/astro@b19d816) Thanks [@&#8203;patrickarlt](https://github.com/patrickarlt)! - Adds support for returning a Promise from the `parser()` option of the `file()` loader

  This enables you to run asynchronous code such as fetching remote data or using async parsers when loading files with the Content Layer API.

  For example:

  ```js
  import { defineCollection } from 'astro:content';
  import { file } from 'astro/loaders';

  const blog = defineCollection({
    loader: file('src/data/blog.json', {
      parser: async (text) => {
        const data = JSON.parse(text);

        // Perform async operations like fetching additional data
        const enrichedData = await fetch(`https://api.example.com/enrich`, {
          method: 'POST',
          body: JSON.stringify(data),
        }).then((res) => res.json());

        return enrichedData;
      },
    }),
  });

  export const collections = { blog };
  ```

  See [the `parser()` reference documentation](https://docs.astro.build/en/reference/content-loader-reference/#parser) for more information.

- [#&#8203;15171](withastro/astro#15171) [`f220726`](withastro/astro@f220726) Thanks [@&#8203;mark-ignacio](https://github.com/mark-ignacio)! - Adds a new, optional `kernel` configuration option to select a resize algorithm in the Sharp image service

  By default, Sharp resizes images with the `lanczos3` kernel. This new config option allows you to set the default resizing algorithm to any resizing option supported by [Sharp](https://sharp.pixelplumbing.com/api-resize/#resize) (e.g. `linear`, `mks2021`).

  Kernel selection can produce quite noticeable differences depending on various characteristics of the source image - especially drawn art - so changing the kernel gives you more control over the appearance of images on your site:

  ```js
  export default defineConfig({
    image: {
      service: {
        entrypoint: 'astro/assets/services/sharp',
        config: {
          kernel: "mks2021"
        }
    }
  })
  ```

  This selection will apply to all images on your site, and is not yet configurable on a per-image basis. For more information, see [Sharps documentation on resizing images](https://sharp.pixelplumbing.com/api-resize/#resize).

- [#&#8203;15063](withastro/astro#15063) [`08e0fd7`](withastro/astro@08e0fd7) Thanks [@&#8203;jmortlock](https://github.com/jmortlock)! - Adds a new `partitioned` option when setting a cookie to allow creating partitioned cookies.

  [Partitioned cookies](https://developer.mozilla.org/en-US/docs/Web/Privacy/Guides/Privacy_sandbox/Partitioned_cookies) can only be read within the context of the top-level site on which they were set. This allows cross-site tracking to be blocked, while still enabling legitimate uses of third-party cookies.

  You can create a partitioned cookie by passing `partitioned: true` when setting a cookie. Note that partitioned cookies must also be set with `secure: true`:

  ```js
  Astro.cookies.set('my-cookie', 'value', {
    partitioned: true,
    secure: true,
  });
  ```

  For more information, see the [`AstroCookieSetOptions` API reference](https://docs.astro.build/en/reference/api-reference/#astrocookiesetoptions).

- [#&#8203;15022](withastro/astro#15022) [`f1fce0e`](withastro/astro@f1fce0e) Thanks [@&#8203;ascorbic](https://github.com/ascorbic)! - Adds a new `retainBody` option to the `glob()` loader to allow reducing the size of the data store.

  Currently, the `glob()` loader stores the raw body of each content file in the entry, in addition to the rendered HTML.

  The `retainBody` option defaults to `true`, but you can set it to `false` to prevent the raw body of content files from being stored in the data store. This significantly reduces the deployed size of the data store and helps avoid hitting size limits for sites with very large collections.

  The rendered body will still be available in the `entry.rendered.html` property for markdown files, and the `entry.filePath` property will still point to the original file.

  ```js
  import { defineCollection } from 'astro:content';
  import { glob } from 'astro/loaders';

  const blog = defineCollection({
    loader: glob({
      pattern: '**/*.md',
      base: './src/content/blog',
      retainBody: false,
    }),
  });
  ```

  When `retainBody` is `false`, `entry.body` will be `undefined` instead of containing the raw file contents.

- [#&#8203;15153](withastro/astro#15153) [`928529f`](withastro/astro@928529f) Thanks [@&#8203;jcayzac](https://github.com/jcayzac)! - Adds a new `background` property to the `<Image />` component.

  This optional property lets you pass a background color to flatten the image with. By default, Sharp uses a black background when flattening an image that is being converted to a format that does not support transparency (e.g. `jpeg`). Providing a value for `background` on an `<Image />` component, or passing it to the `getImage()` helper, will flatten images using that color instead.

  This is especially useful when the requested output format doesn't support an alpha channel (e.g. `jpeg`) and can't support transparent backgrounds.

  ```astro
  ---
  import { Image } from 'astro:assets';
  ---

  <Image
    src="/transparent.png"
    alt="A JPEG with a white background!"
    format="jpeg"
    background="#ffffff"
  />
  ```

  See more about this new property in [the image reference docs](https://docs.astro.build/en/reference/modules/astro-assets/#background)

- [#&#8203;15015](withastro/astro#15015) [`54f6006`](withastro/astro@54f6006) Thanks [@&#8203;tony](https://github.com/tony)! - Adds optional `placement` config option for the dev toolbar.

  You can now configure the default toolbar position (`'bottom-left'`, `'bottom-center'`, or `'bottom-right'`) via `devToolbar.placement` in your Astro config. This option is helpful for sites with UI elements (chat widgets, cookie banners) that are consistently obscured by the toolbar in the dev environment.

  You can set a project default that is consistent across environments (e.g. dev machines, browser instances, team members):

  ```js
  // astro.config.mjs
  export default defineConfig({
    devToolbar: {
      placement: 'bottom-left',
    },
  });
  ```

  User preferences from the toolbar UI (stored in `localStorage`) still take priority, so this setting can be overridden in individual situations as necessary.

### [`v5.16.16`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#51616)

[Compare Source](https://github.com/withastro/astro/compare/[email protected]@5.16.16)

##### Patch Changes

- [#&#8203;15281](withastro/astro#15281) [`a1b80c6`](withastro/astro@a1b80c6) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Ensures server island requests carry an encrypted component export identifier so they do not accidentally resolve to the wrong component.

- [#&#8203;15304](withastro/astro#15304) [`02ee3c7`](withastro/astro@02ee3c7) Thanks [@&#8203;cameronapak](https://github.com/cameronapak)! - Fix: Remove await from getActionResult example

- [#&#8203;15324](withastro/astro#15324) [`ab41c3e`](withastro/astro@ab41c3e) Thanks [@&#8203;Princesseuh](https://github.com/Princesseuh)! - Fixes an issue where certain unauthorized links could be rendered as clickable in the error overlay

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45Mi4xMiIsInVwZGF0ZWRJblZlciI6IjQyLjkyLjEyIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
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.

OOM with CJK fonts after v5.16.13 when using Fonts API

3 participants