0.5.0 • Published 7 years ago

os-fonts v0.5.0

Weekly downloads
38
License
MIT
Repository
github
Last release
7 years ago

os-fonts

Travis Coveralls branch license

Retrieve fonts available on your OS.

Install

$ npm install --save os-fonts

Usage

const osFonts = require('os-fonts');

osFonts.getAll().then(fonts => {
  // array of fonts...
  fonts.forEach(font => {
    console.log(font);
  });
})

API

getAll(useType)

Returns a Promise with all paths to all fonts.

useType

Type: String

Default: system

Options: user, local, network, system

The use type.

getAllSync(useType)

Returns paths to all fonts (synchronous version of getAll).

getFontsInDirectory(dir)

Returns a Promise with paths to all fonts in the given directory.

dir

Type: String

The directory to read

getFontsInDirectory(dir)

Returns paths to all fonts in the given directory (synchronous version of getFontsInDirectory).

License

MIT © Vu Tran

0.5.0

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

0.0.0

8 years ago