最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Get all system fonts electron js - Stack Overflow

programmeradmin1浏览0评论

I am building a desktop application using Electron. In my app I have a window that sets some user preferences such ass background color for my app.I want to be able to show a select box which will contain all system fonts.Is that possible?

UPDATE

My app is going to be cross platform so I would like a cross platform solution if possible

I am building a desktop application using Electron. In my app I have a window that sets some user preferences such ass background color for my app.I want to be able to show a select box which will contain all system fonts.Is that possible?

UPDATE

My app is going to be cross platform so I would like a cross platform solution if possible

Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked Apr 29, 2017 at 7:54 Manos KounelakisManos Kounelakis 3,1815 gold badges38 silver badges66 bronze badges 6
  • I think you need to make setup with fonts with .EXE – chirag solanki Commented Apr 29, 2017 at 7:57
  • Have you checked out font-manager? – Hugues M. Commented Apr 29, 2017 at 18:32
  • what is this? @HuguesMoreau – Manos Kounelakis Commented Apr 29, 2017 at 18:33
  • @ManosKounelakis It's a package for Node.js that offers the functionality you requested. Electron uses Node.js, so you can use Node.js packages (using NPM). – Hugues M. Commented Apr 29, 2017 at 18:38
  • @HuguesMoreau you can post it as an answer so I can accept it .It will also be more helpful for others – Manos Kounelakis Commented Apr 29, 2017 at 18:57
 |  Show 1 more ment

1 Answer 1

Reset to default 8

font-manager is a "module for Node.js providing access to the system font catalog", which seems to fit the bill.

Supported platforms:

  • Mac OS X 10.5 and later supported via CoreText
  • Windows 7 and later supported via DirectWrite
  • Linux supported via fontconfig
发布评论

评论列表(0)

  1. 暂无评论