Whalebird-desktop-client-ma.../src/main/fonts.ts

12 lines
277 B
TypeScript
Raw Normal View History

import SystemFonts from 'system-font-families'
2018-09-25 18:02:36 +02:00
const fonts = async (): Promise<Array<string>> => {
const systemFonts = new SystemFonts()
return systemFonts.getFonts()
.then((res: string) => {
return Array.from(new Set(res)).sort()
2018-09-25 18:02:36 +02:00
})
}
export default fonts