---
title: "Astro Font ChangeLog"
description: "Find the changelog of astro-font library by LaunchFa.st that helps you optimize fonts in an instant."
source: "https://www.launchfa.st/blog/astro-font-changelog"
author: "Rishi Raj Jain"
created_at: 2024-01-08T00:00:00.000Z
updated_at: 2026-08-10T00:00:00.000Z
---

> **Site index for agents**
> Fetch https://www.launchfa.st/llms.txt to discover every page on this site.
> Every page is also available as Markdown by appending `.md` to its URL.

<div />

[**astro-font**](https://www.npmjs.com/package/astro-font) will automatically optimize your Custom Fonts, Local Fonts, Fonts over any CDN and Google fonts for performance.

### **astro-font@1.2.0 (latest)**

With `astro-font@^1.2.0`, the library now:

- caches font resolution across renders, so a single config shared by many pages fetches the upstream Google Fonts CSS once per build instead of once per page. On a site with hundreds of prerendered pages, this turns a per-page network request into a single build-time fetch.
- introduces an optional `assetsPrefix` to serve preloaded and self-hosted fonts from a CDN. Set it globally on the component, or override it per font in the config.
- exports font-data utilities (`getFontData`, `getFonts`, `getFontURL`, `getFontURLs`, `resolveFonts`, `clearResolvedFontsCache`, and `generatePublicUrl`) so you can resolve a font config and read the raw bytes or URLs without rendering the component. This is handy for Satori (OG images) and API endpoints.
- degrades gracefully when Google Fonts is unreachable. Instead of failing the build or dev render, it warns and falls back to the configured fallback font.
- fixes font bundling with the integration on Windows by resolving the build output directory with `fileURLToPath`.

### **astro-font@1.1.0**

With `astro-font@^1.1.0`, the library now:

- has an Astro integration out which takes care of bundling all the (nested) fonts in `__astro_font_generated__` directory in your static bundle. Use it via:

```diff
// File: astro.config.*
+  import { astroFont } from 'astro-font/integration'
  // ...
  integrations: [
+  astroFont()
  ]
  // ...
```

- writes fetched font files locally if it has write access

### **astro-font@1.0.0**

With `astro-font@^1.0.0`, the library now ensures that the `basePath` specified in the font configuration exists, and the font name specified is enclosed under quotes which allows whitespaces in the name of the font.

### **astro-font@0.1.81**

In astro-font@^0.1.81, support for locally hosted fonts in local development environments has been introduced. Simply put, the checks for `https:` have been extended to `http:`. Also, the type definitions for the `style` and `weight` attributes per configuration have been updated to support `string`, and `string` and `number` respectively.

### **astro-font@0.0.80**

In astro-font@^0.0.80, the CSS font parser for fonts loading over CDN such as Google Fonts, TypeKit, etc. has improved. It's now able to map over each attribute of the font-face property returned by the CDN, and create an equivalent CSS.

To create in-browser like requests, each outgoing request is appended with the `'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36'` header. This helps obtain the `unicode-range` which optimizes the in-browser font downloading as if the page doesn't use any character in that range, the font is not downloaded at all.

### **astro-font@0.0.79**

In astro-font@^0.0.79, there are type values introduced for the following CSS properties, allowing you to choose the values based on standard web practices in your IDE.

To keep it backward compatible, any kind of string or number value is allowed.

- style: https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
- weight: https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
- display: https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display

- [fix: font weight issue and types improvements](https://github.com/rishi-raj-jain/astro-font/pull/13)

Thank you [Florian Lefebvre](https://twitter.com/LfbvrFlo) for this amazing contribution!

### **astro-font@0.0.78**

- [add fallback for monospace](https://github.com/rishi-raj-jain/astro-font/commit/c27085ca24aea6c54adef82cb857729448dbbc45)

### **astro-font@0.0.77**

- [ensure better randomness in the fallback font name](https://github.com/rishi-raj-jain/astro-font/commit/3a8f838835af9483d48bf27d22b3f793b5e47b5a)

### **astro-font@0.0.76**

- introduce per config `verbose` flag to create less noise in terminals

### **astro-font@0.0.75**

- introduce `fallbackName` per config flag to allow customizing fallback font's name

### **astro-font@0.0.74**

- only use `pathe` for relativizing the paths to get POSIX like output for font paths (thanks to @florian-lefebvre for suggesting it & @pi0 for making pathe)

### **astro-font@0.0.73**

- use `pathe` instead of relying on node:path to support all environments

### **astro-font@0.0.72**

- custom patch duplicate `axisIndex:o,axisIndex:o` bug of the core `fontkit` library (thanks to [@lukasborawski](https://github.com/lukasborawski) for reaching out and suggesting the fix)

### **astro-font@0.0.71**

- add support for Google Fonts URLs + Any CDN URL that responds back with CSS

### **astro-font@0.0.70**

- remove `github-slugger` as the package dependency

### **astro-font@0.0.69**

- allow granular configuration of preloads per font per config
- hide errors that occurred during determining write access (for lesser noise in terminals)

### **astro-font@0.0.68**

- introduce `cssVariable` per config **optional** flag to ship `font-family` style in a CSS variable
- make `selector` per config **optional**

### **astro-font@0.0.67**

- gracefully handles non fallback-font computation scenarios
- introduce `fetch` per config flag to decide which set of fonts to be localized
- files are NOT fetched and localized by default, everything remains as-is to provide a better DX
- gracefully handles non-caching scenarios
- got rid of custom `.astro_font` directory for caching (less things to see/learn)

## References

- **GitHub**: [astro-font](https://github.com/rishi-raj-jain/astro-font)
- **Astro, SvelteKit and Next.js Starter Kits**: [launchfa.st](https://www.launchfa.st)
