# google-fonts

> A small helper library for embedding Google Fonts on your page.

Latest version **1.0.0** (published 2016-02-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install google-fonts
pnpm add google-fonts
yarn add google-fonts
bun add google-fonts
```

## Health

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

Positive: has types package; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-02-01 |
| First published | 2013-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/google-fonts) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Hugh Kennedy |
| Maintainers | hughsk |
| Keywords | google, fonts, webfonts, inline, embed, append |

## Links

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

## Recent versions

- 1.0.0 (latest) — 2016-02-01
- 0.0.0 — 2013-09-21

## README

# google-fonts [![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #

[![google-fonts](https://nodei.co/npm/google-fonts.png?mini=true)](https://nodei.co/npm/google-fonts)

A small helper library for embedding
[Google Fonts](http://www.google.com/fonts) onto your page.

## Usage ##

## `fonts(list)` ##

Given a list of fonts (see below), returns a string like this one (minus the
whitespace) that you can include in a template:

``` html
<link
  href='http://fonts.googleapis.com/css?family=Cantora+One|Ropa+Sans:400,400italic'
  rel='stylesheet'
  type='text/css'
>
```

## `fonts.add(list)` ##

Given the same list of fonts, you can add them directly to your page using
this method (assuming you're using something like
[browserify](http://browserify.org)).

Useful for quick demos/prototypes, but if you want to avoid the flash of
unstyled text then stick with pasting their snippet in your HTML.

The list should be formatted like so:

``` javascript
fonts.add({
    'Ropa Sans': ['400', '400italic']
  , 'Source Sans Pro': true
  , 'Raleway': 400
})
```

Where each key is a font name, and each value is an array of styles to include.
You can also pass a single style, or `true` to include all of the available
ones for that font.

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