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