system-font-paths
v1.2.0
Published
Finds the paths of all locally installed system fonts
Downloads
37
Readme
system-font-paths
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
- Mac OS X 10.5 and later supported via CoreText
- Windows 7 and later supported via DirectWrite
- Linux supported via fontconfig
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: