Skip to content

Commit

Permalink
font family custom select
Browse files Browse the repository at this point in the history
  • Loading branch information
qishibo committed Jun 12, 2019
1 parent 34a994b commit d6cc630
Show file tree
Hide file tree
Showing 11 changed files with 638 additions and 6 deletions.
1 change: 1 addition & 0 deletions pack/electron/electron-main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Modules to control application life and create native browser window
const { app, BrowserWindow, Menu } = require('electron');
const fontManager = require('./font-manager');

global.APP_ENV = 'dev';

Expand Down
9 changes: 9 additions & 0 deletions pack/electron/font-manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const { ipcMain } = require('electron');

ipcMain.on('get-all-fonts', (event, arg) => {
console.log('main, get-all-fonts...');

require('font-manager').getAvailableFonts((fonts) => {
event.sender.send('send-all-fonts', fonts);
});
});
3 changes: 2 additions & 1 deletion pack/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"private": true,
"main": "electron-main.js",
"dependencies": {
"electron-updater": "^4.0.6"
"electron-updater": "^4.0.6",
"font-manager": "^0.3.0"
},
"publish": [{
"provider": "github",
Expand Down
Loading

0 comments on commit d6cc630

Please sign in to comment.