# gatsby-plugin-prefetch-google-fonts

> A Gatsby plugin to download and prefetch [Google Fonts](https://fonts.google.com/). Can increase performance as opposed to loading webfonts from Google's external stylesheet.

Latest version **1.4.3** (published 2019-07-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install gatsby-plugin-prefetch-google-fonts
pnpm add gatsby-plugin-prefetch-google-fonts
yarn add gatsby-plugin-prefetch-google-fonts
bun add gatsby-plugin-prefetch-google-fonts
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.3 |
| Published | 2019-07-30 |
| First published | 2018-09-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 687.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kennedy Rose |
| Maintainers | ken85rose, tbaustin |
| Keywords | gatsby-plugin, gatsby, plugin, web, font, loader, google, webfont, webfontloader, prefetch, download, downloader, local |

## Links

- npm: https://www.npmjs.com/package/gatsby-plugin-prefetch-google-fonts
- Repository: https://github.com/escaladesports/gatsby-plugin-prefetch-google-fonts
- Homepage: https://github.com/escaladesports/gatsby-plugin-prefetch-google-fonts#readme
- Issues: https://github.com/escaladesports/gatsby-plugin-prefetch-google-fonts/issues
- npm.io page: https://npm.io/package/gatsby-plugin-prefetch-google-fonts

## Dependencies (8)

- [globby](https://npm.io/package/globby.md) ^8.0.1
- [download](https://npm.io/package/download.md) ^7.1.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^7.0.0
- [get-urls](https://npm.io/package/get-urls.md) ^8.0.0
- [clean-css](https://npm.io/package/clean-css.md) ^4.2.1
- [object-hash](https://npm.io/package/object-hash.md) ^1.3.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.2.0
- [google-fonts-plugin](https://npm.io/package/google-fonts-plugin.md) 2.0.2

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.4.3 (latest) — 2019-07-30
- 1.4.2 — 2019-04-08
- 1.4.1 — 2019-03-28
- 1.4.0 — 2019-02-04
- 1.3.1 — 2019-01-31
- 1.3.0 — 2019-01-29
- 1.2.0 — 2019-01-29
- 1.1.1 — 2018-12-05
- 1.0.11 — 2018-09-06
- 1.0.10 — 2018-09-06
- 1.0.9 — 2018-09-06
- 1.0.8 — 2018-09-06
- 1.0.6 — 2018-09-06
- 1.0.7 — 2018-09-06
- 1.0.5 — 2018-09-06
- … 2 more at https://npm.io/package/gatsby-plugin-prefetch-google-fonts/versions

## README

# gatsby-plugin-prefetch-google-fonts

A Gatsby plugin to download and prefetch [Google Fonts](https://fonts.google.com/). Can increase performance as opposed to loading webfonts from Google's external stylesheet.

## Installation

With npm:

```bash
npm install --save gatsby-plugin-prefetch-google-fonts
```

Or with Yarn:

```bash
yarn add gatsby-plugin-prefetch-google-fonts
```

## Usage

In your `gatsby-config.js` file, load in the plugin along with which web fonts to load.

```javascript
module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-prefetch-google-fonts`,
      options: {
        fonts: [
          {
            family: `Oswald`,
            subsets: [`latin`],
          },
          {
            family: `Open Sans`,
            variants: [`400`, `700`]
          },
        ],
      },
    }
  ]
}
```

For a list of all available font family options, consult the [google-fonts-plugin readme](https://github.com/SirPole/google-fonts-plugin).

---
_Source: https://npm.io/package/gatsby-plugin-prefetch-google-fonts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
