This commit is contained in:
Cutls 2019-04-13 02:31:07 +09:00
parent 7965e7c742
commit a1048b3243
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,6 @@ function system(mainWindow, dir, lang) {
const BrowserWindow = electron.BrowserWindow; const BrowserWindow = electron.BrowserWindow;
const dialog = electron.dialog; const dialog = electron.dialog;
const os = require('os') const os = require('os')
const fm = require('font-manager');
const language=require("../main/language.js"); const language=require("../main/language.js");
ipc.on('native-notf', function(e, args) { ipc.on('native-notf', function(e, args) {
@ -172,6 +171,7 @@ function system(mainWindow, dir, lang) {
fn(data); // ソート後の配列を返す fn(data); // ソート後の配列を返す
} }
ipc.on('fonts', (e, arg) => { ipc.on('fonts', (e, arg) => {
const fm = require('font-manager');
var fonts = fm.getAvailableFontsSync(); var fonts = fm.getAvailableFontsSync();
object_array_sort(fonts, 'family', 'asc', function(fonts_sorted) { object_array_sort(fonts, 'family', 'asc', function(fonts_sorted) {
mainWindow.webContents.send('font-list', fonts_sorted); mainWindow.webContents.send('font-list', fonts_sorted);

View File

@ -40,7 +40,6 @@
"license": "GPL-3.0", "license": "GPL-3.0",
"dependencies": { "dependencies": {
"electron-dl": "^1.11.0", "electron-dl": "^1.11.0",
"font-manager": "^0.3.0",
"jimp": "^0.2.28", "jimp": "^0.2.28",
"json5": "^2.1.0", "json5": "^2.1.0",
"node-notifier": "^5.2.1", "node-notifier": "^5.2.1",
@ -49,7 +48,8 @@
}, },
"optionalDependencies": { "optionalDependencies": {
"nowplaying-node": "^0.1.3", "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": { "build": {
"productName": "TheDesk", "productName": "TheDesk",