Socket
Socket
Sign inDemoInstall

get-system-fonts

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    get-system-fonts

List full paths to all system fonts


Version published
Weekly downloads
17K
decreased by-4.44%
Maintainers
1
Install size
22.0 kB
Created
Weekly downloads
 

Changelog

Source

2.0.2 (2020-06-12)

Bug Fixes

  • no: add option to regexp ignoreCase (#8) (0b3271f)

Readme

Source

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.

Keywords

FAQs

Last updated on 12 Jun 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc