os fonts
1.0.0
检索OS上可用的字体。
$ npm install --save os-fonts const osFonts = require ( 'os-fonts' ) ;
osFonts . getAll ( ) . then ( fonts => {
// array of fonts...
fonts . forEach ( font => {
console . log ( font ) ;
} ) ;
} ) 将所有路径的Promise返回到所有字体。
类型: String
默认值: system
选项: user , local , network , system
使用类型。
将路径返回到所有字体( getAll的同步版)。
返回给定目录中所有字体的路径的Promise 。
类型: String
阅读目录
返回给定目录中所有字体( getFontsInDirectory的同步版)中的所有字体。
麻省理工学院©Vu Tran