# get-system-fonts

> List full paths to all system fonts

Latest version **2.0.2** (published 2020-06-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install get-system-fonts
pnpm add get-system-fonts
yarn add get-system-fonts
bun add get-system-fonts
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2020-06-12 |
| First published | 2018-04-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >8.0.0 |
| Dependencies | 0 |
| Unpacked size | 21.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 20 |
| Author | Jeff Principe |
| Maintainers | princjef |
| Keywords | font, system, ttf, otf, file |

## Links

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

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 2.0.2 (latest) — 2020-06-12
- 2.0.1 — 2019-04-23
- 2.0.0 — 2018-07-30
- 1.0.0 — 2018-04-28

## README

# get-system-fonts

[![Travis CI build status](https://travis-ci.org/princjef/get-system-fonts.svg?branch=master)](https://travis-ci.org/princjef/get-system-fonts)
[![codecov](https://codecov.io/gh/princjef/get-system-fonts/branch/master/graph/badge.svg)](https://codecov.io/gh/princjef/get-system-fonts)
[![npm version](https://img.shields.io/npm/v/get-system-fonts.svg)](https://npmjs.org/package/get-system-fonts)

List full paths to all of the system fonts present.

```
npm install get-system-fonts
```

## Usage

```js
const getSystemFonts = require('get-system-fonts');

// In an async function...
const files = await getSystemFonts(); // ['/Library/Fonts/Georgia.ttf', ...]
```

## API

### `getSystemFonts([options]): Promise<string[]>`

Lists absolute paths to all system fonts

*NOTE: If you're using Typescript, `getSystemFonts()` is available as the 
default export.*

**Params**

 * `options` [*object*] - Options for configuring retrieval
    * `additionalFolders` [*string[]*] - Paths to additional folders to
      recursively scan for font files. Absolute paths are recommended. Default:
      `[]`
    * `extensions` [*string[]*] - List of file extensions to treat as font
      files. Default: `['ttf', 'otf', 'ttc', 'woff', 'woff2']`

## Contributing

Want to contribute to the project? Go check out the [Contribution 
Guide](CONTRIBUTING.md) for instructions to set up your development 
environment, open an issue and create a pull request.

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