diff --git a/app/main/system.js b/app/main/system.js index 715c1a3e..05f86167 100644 --- a/app/main/system.js +++ b/app/main/system.js @@ -11,7 +11,6 @@ function system(mainWindow, dir, lang) { const BrowserWindow = electron.BrowserWindow; const dialog = electron.dialog; const os = require('os') - const fm = require('font-manager'); const language=require("../main/language.js"); ipc.on('native-notf', function(e, args) { @@ -172,6 +171,7 @@ function system(mainWindow, dir, lang) { fn(data); // ソート後の配列を返す } ipc.on('fonts', (e, arg) => { + const fm = require('font-manager'); var fonts = fm.getAvailableFontsSync(); object_array_sort(fonts, 'family', 'asc', function(fonts_sorted) { mainWindow.webContents.send('font-list', fonts_sorted); diff --git a/app/package.json b/app/package.json index b96ad005..256c3e35 100644 --- a/app/package.json +++ b/app/package.json @@ -40,7 +40,6 @@ "license": "GPL-3.0", "dependencies": { "electron-dl": "^1.11.0", - "font-manager": "^0.3.0", "jimp": "^0.2.28", "json5": "^2.1.0", "node-notifier": "^5.2.1", @@ -49,7 +48,8 @@ }, "optionalDependencies": { "nowplaying-node": "^0.1.3", - "itunes-nowplaying-mac": "git+https://github.com/rinsuki/itunes-nowplaying-mac#pull/1/head" + "itunes-nowplaying-mac": "git+https://github.com/rinsuki/itunes-nowplaying-mac#pull/1/head", + "font-manager": "^0.3.0" }, "build": { "productName": "TheDesk",