Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

system-font-paths

luciancooper48MIT1.2.1TypeScript support: included

Finds the paths of all locally installed system fonts

fonts, font, otf, ttf, ttc, opentype

readme

system-font-paths

npm ci license

A C++ module for Node.js that lists all locally installed system font files.

About

This package exports a single async function that returns an array containing the file paths of all locally installed fonts. It is a slimmed down version of fontmanager-redux.

Platforms

Installation

Install with npm:

npm install system-font-paths

Or with yarn:

yarn add system-font-paths

Prebuilt binaries for node 16, 18, 20, and 22 are provided via node-pre-gyp for the following platforms:

  • macOS x64 and arm64
  • Windows x64 and x86
  • Linux x64 (Ubuntu)

API

This package exports a single asynchronous function that promises an array of font file path strings:

import systemFontPaths from 'system-font-paths';

systemFontPaths().then((fontPaths) => { ... });

Acknowledgements

This project is based heavily on the fontmanager-redux and font-manager packages:

License

MIT