os fonts
1.0.0
Retrieve fonts available on your OS.
$ npm install --save os-fontsconst osFonts = require('os-fonts');
osFonts.getAll().then(fonts => {
// array of fonts...
fonts.forEach(font => {
console.log(font);
});
})Returns a Promise with all paths to all fonts.
Type: String
Default: system
Options: user, local, network, system
The use type.
Returns paths to all fonts (synchronous version of getAll).
Returns a Promise with paths to all fonts in the given directory.
Type: String
The directory to read
Returns paths to all fonts in the given directory (synchronous version of getFontsInDirectory).
MIT © Vu Tran