1.0.0 • Published 6 years ago
font-list-universal v1.0.0
font-list
font-list is a Node.js package for listing the fonts available on your system.
Current version supports MacOS, Windows, and Unix (Linux, FreeBSD, NetBSD, OpenBSD...).
Install
npm install font-listUsage
const fontList = require('font-list')
fontList.getFonts()
.then(fonts => {
console.log(fonts)
})
.catch(err => {
console.log(err)
})The return value fonts is an Array, looks like:
[ 'Adobe Arabic',
'Adobe Caslon Pro',
'Adobe Devanagari',
'Adobe Fan Heiti Std',
'Adobe Fangsong Std',
'Arial',
...
]If the font name is wrapped in "" the wrapping "" will be removed.
1.0.0
6 years ago