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