get-system-fonts
List full paths to all system fonts
Last updated 4 years ago by princjef .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install get-system-fonts 
SYNC missed versions from official npm registry.

get-system-fonts

Travis CI build status codecov npm version

List full paths to all of the system fonts present.

npm install get-system-fonts

Usage

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 for instructions to set up your development environment, open an issue and create a pull request.

Current Tags

  • 2.0.2                                ...           latest (4 years ago)

4 Versions

  • 2.0.2                                ...           4 years ago
  • 2.0.1                                ...           6 years ago
  • 2.0.0                                ...           6 years ago
  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (21)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |