os-fonts
Retrieve fonts available on your OS.
Last updated 3 years ago by vutran .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install os-fonts 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.5.0                                ...           latest (3 years ago)

9 Versions

  • 0.5.0                                ...           3 years ago
  • 0.4.1                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.2                                ...           4 years ago
  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dependencies (2)
Dev Dependencies (9)

Copyright 2014 - 2016 © taobao.org |