# font-preloader

> A simple module which takes an array of font-family names as input, and makes the browser preload them.

Latest version **1.0.7** (published 2017-09-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install font-preloader
pnpm add font-preloader
yarn add font-preloader
bun add font-preloader
```

## 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.0.7 |
| Published | 2017-09-26 |
| First published | 2016-09-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+10 in 1 direct dependencies) |
| Install scripts | yes |
| GitHub stars | 0 |
| Author | Kevin M. Cunha |
| Maintainers | mitchellcunha |
| Keywords | font, preload |

## Links

- npm: https://www.npmjs.com/package/font-preloader
- Repository: https://github.com/mitchellcunha/font-preloader
- Homepage: https://github.com/mitchellcunha/font-preloader#readme
- Issues: https://github.com/mitchellcunha/font-preloader/issues
- npm.io page: https://npm.io/package/font-preloader

## Dependencies (4)

- [lodash](https://npm.io/package/lodash.md) 4.16.4
- [babel-cli](https://npm.io/package/babel-cli.md) 6.26.0
- [babel-register](https://npm.io/package/babel-register.md) 6.26.0
- [babel-preset-env](https://npm.io/package/babel-preset-env.md) 1.6.0

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 1.0.7 (latest) — 2017-09-26
- 1.0.4 — 2016-09-27
- 1.0.3 — 2016-09-26
- 1.0.2 — 2016-09-26
- 1.0.1 — 2016-09-26
- 1.0.0 — 2016-09-26

## README

## font-preloader
A simple module which takes an array of font-family names as input, and quickly adds an empty span with each font-family to an invisible div in the body of your web page. This forces the web browser to preload those fonts, and then the module removes the div completely.

## Installation
`npm install --save font-preloader`

## Usage
Require and call this module when your css has been added to the page and you are about to start the application.

```javascript
const preloader = require('font-preloader');

// Font families in your css that you want to preload ahead of seeing them.
let fontFamilies = ['font-family-one', 'font-family-two'];
preloader(fontFamilies);
```

---
_Source: https://npm.io/package/font-preloader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
